git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1569 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.67
| @@ -456,7 +456,6 @@ class JackConnectionManager | |||||
| void ResetGraph(JackClientTiming* timing); | void ResetGraph(JackClientTiming* timing); | ||||
| int ResumeRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing); | int ResumeRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing); | ||||
| int SuspendRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing, long time_out_usec); | int SuspendRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing, long time_out_usec); | ||||
| }; | }; | ||||
| } // end of namespace | } // end of namespace | ||||
| @@ -82,8 +82,6 @@ class EXPORT JackDriverInterface | |||||
| virtual int ProcessSlaves() = 0; | virtual int ProcessSlaves() = 0; | ||||
| virtual bool IsRealTime() = 0; | virtual bool IsRealTime() = 0; | ||||
| virtual void PrintState() = 0; | |||||
| }; | }; | ||||
| /*! | /*! | ||||
| @@ -201,9 +199,6 @@ class EXPORT JackDriver : public JackDriverClient | |||||
| virtual bool IsRealTime(); | virtual bool IsRealTime(); | ||||
| virtual void PrintState() | |||||
| {} | |||||
| int ClientNotify(int refnum, const char* name, int notify, int sync, int value) | int ClientNotify(int refnum, const char* name, int notify, int sync, int value) | ||||
| { | { | ||||
| return 0; | return 0; | ||||
| @@ -66,31 +66,6 @@ int JackDummyDriver::Process() | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| void JackDummyDriver::PrintState() | |||||
| { | |||||
| std::cout << "JackDummyDriver state" << std::endl; | |||||
| jack_port_id_t port_index; | |||||
| std::cout << "Input ports" << std::endl; | |||||
| for (int i = 0; i < fPlaybackChannels; i++) { | |||||
| port_index = fCapturePortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| std::cout << "Output ports" << std::endl; | |||||
| for (int i = 0; i < fCaptureChannels; i++) { | |||||
| port_index = fPlaybackPortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| } | |||||
| } // end of namespace | } // end of namespace | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| @@ -59,7 +59,6 @@ class JackDummyDriver : public JackAudioDriver | |||||
| jack_nframes_t playback_latency); | jack_nframes_t playback_latency); | ||||
| int Process(); | int Process(); | ||||
| void PrintState(); | |||||
| }; | }; | ||||
| } // end of namespace | } // end of namespace | ||||
| @@ -745,23 +745,5 @@ int JackEngine::SetTimebaseCallback(int refnum, int conditional) | |||||
| return fEngineControl->fTransport.SetTimebase(refnum, conditional); | return fEngineControl->fTransport.SetTimebase(refnum, conditional); | ||||
| } | } | ||||
| //----------- | |||||
| // Debugging | |||||
| //----------- | |||||
| void JackEngine::PrintState() | |||||
| { | |||||
| std::cout << "Engine State" << std::endl; | |||||
| for (int i = 0; i < CLIENT_NUM; i++) { | |||||
| JackClientInterface* client = fClientTable[i]; | |||||
| if (client) | |||||
| std::cout << "Client : " << client->GetClientControl()->fName << " : " << i << std::endl; | |||||
| } | |||||
| //fGraphManager->PrintState(); | |||||
| fEngineTiming->PrintState(); | |||||
| } | |||||
| } // end of namespace | } // end of namespace | ||||
| @@ -120,8 +120,6 @@ class JackEngine | |||||
| void NotifyFreewheel(bool onoff); | void NotifyFreewheel(bool onoff); | ||||
| void NotifyPortRegistation(jack_port_id_t port_index, bool onoff); | void NotifyPortRegistation(jack_port_id_t port_index, bool onoff); | ||||
| void NotifyActivate(int refnum); | void NotifyActivate(int refnum); | ||||
| void PrintState(); | |||||
| }; | }; | ||||
| @@ -128,88 +128,6 @@ void JackEngineTiming::GetTimeMeasure(jack_time_t callbackUsecs) | |||||
| } | } | ||||
| } | } | ||||
| void JackEngineTiming::PrintState() | |||||
| { | |||||
| jack_time_t prevtime, time; | |||||
| prevtime = time = fMeasure[0].fEngineTime; | |||||
| int cycle, prevcycle = fMeasure[0].fAudioCycle; | |||||
| /* | |||||
| std::ofstream f("measure.txt"); | |||||
| if (f.is_open()) { | |||||
| //std::cout << "---------------------------------------------" << std::endl; | |||||
| for (int i = 0; i < CLIENT_NUM; i++) { // client | |||||
| JackClientInterface* client = fClientTable[i]; | |||||
| if (client && client->GetClientControl()->fActive) { | |||||
| // f << "Client : " << i << std::endl; | |||||
| long maxsignalledat = 0; | |||||
| long maxawakedat = 0; | |||||
| long maxfinisheddat = 0; | |||||
| bool max = false; | |||||
| prevtime = fMeasure[0].fEngineTime; | |||||
| prevcycle = fMeasure[0].fAudioCycle; | |||||
| // TODO | |||||
| for (int j = 0; j < TIME_POINTS; j++) { // measure | |||||
| time = fMeasure[j].fEngineTime; | |||||
| cycle = fMeasure[j].fAudioCycle; | |||||
| if (fMeasure[j].fClientTable[i].fRefNum > 0) { | |||||
| if (fMeasure[j].fClientTable[i].fStatus != Finished) { | |||||
| f << "error status " << '\t' | |||||
| << prevtime << '\t' | |||||
| << time << '\t' | |||||
| << fMeasure[j + 1].fEngineTime << '\t' | |||||
| << prevcycle << '\t' | |||||
| << cycle << '\t' | |||||
| << fMeasure[j].fClientTable[i].fSignaledAt << '\t' | |||||
| << fMeasure[j].fClientTable[i].fAwakeAt << '\t' | |||||
| << fMeasure[j].fClientTable[i].fFinishedAt | |||||
| << std::endl; | |||||
| } | |||||
| if (long(time - prevtime) > 0) { | |||||
| f << long(time - prevtime) << '\t' | |||||
| << fMeasure[j].fClientTable[i].fSignaledAt - time << '\t' | |||||
| << fMeasure[j].fClientTable[i].fAwakeAt - time << '\t' | |||||
| << fMeasure[j].fClientTable[i].fFinishedAt - time << '\t' | |||||
| << fMeasure[j].fClientTable[i].fStatus | |||||
| << std::endl; | |||||
| } else { | |||||
| f << "error time : " << j << " " << long(time - prevtime) << std::endl; | |||||
| } | |||||
| maxsignalledat = MAX(maxsignalledat, long(fMeasure[j].fClientTable[i].fSignaledAt - time)); | |||||
| maxawakedat = MAX(maxawakedat, long(fMeasure[j].fClientTable[i].fAwakeAt - time)); | |||||
| maxfinisheddat = MAX(maxfinisheddat, long(fMeasure[j].fClientTable[i].fFinishedAt - time)); | |||||
| max = true; | |||||
| } | |||||
| prevtime = time; | |||||
| prevcycle = cycle; | |||||
| } | |||||
| f << std::endl; | |||||
| if (max) { | |||||
| f << "maxsignalledat: " << maxsignalledat | |||||
| << '\t' << "maxawakedat: " << maxawakedat | |||||
| << '\t' << "maxfinisheddat: " << maxfinisheddat | |||||
| << '\t' << std::endl; | |||||
| } | |||||
| } | |||||
| } | |||||
| f.close(); | |||||
| } | |||||
| */ | |||||
| } | |||||
| void JackEngineTiming::ClearTimeMeasures() | void JackEngineTiming::ClearTimeMeasures() | ||||
| { | { | ||||
| for (int i = 0; i < TIME_POINTS; i++) { | for (int i = 0; i < TIME_POINTS; i++) { | ||||
| @@ -96,7 +96,6 @@ class JackEngineTiming | |||||
| void ResetRollingUsecs(); | void ResetRollingUsecs(); | ||||
| void ClearTimeMeasures(); | void ClearTimeMeasures(); | ||||
| void PrintState(); | |||||
| }; | }; | ||||
| } // end of namespace | } // end of namespace | ||||
| @@ -50,31 +50,6 @@ int JackLoopbackDriver::Process() | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| void JackLoopbackDriver::PrintState() | |||||
| { | |||||
| int i; | |||||
| jack_port_id_t port_index; | |||||
| std::cout << "JackLoopbackDriver state" << std::endl; | |||||
| std::cout << "Input ports" << std::endl; | |||||
| for (i = 0; i < fPlaybackChannels; i++) { | |||||
| port_index = fCapturePortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| std::cout << "Output ports" << std::endl; | |||||
| for (i = 0; i < fCaptureChannels; i++) { | |||||
| port_index = fPlaybackPortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| } | |||||
| } // end of namespace | } // end of namespace | ||||
| /* | /* | ||||
| @@ -43,7 +43,6 @@ class JackLoopbackDriver : public JackAudioDriver | |||||
| {} | {} | ||||
| int Process(); | int Process(); | ||||
| void PrintState(); | |||||
| }; | }; | ||||
| } // end of namespace | } // end of namespace | ||||
| @@ -296,11 +296,5 @@ JackGraphManager* JackServer::GetGraphManager() | |||||
| return fGraphManager; | return fGraphManager; | ||||
| } | } | ||||
| void JackServer::PrintState() | |||||
| { | |||||
| fAudioDriver->PrintState(); | |||||
| fEngine->PrintState(); | |||||
| } | |||||
| } // end of namespace | } // end of namespace | ||||
| @@ -79,8 +79,6 @@ class EXPORT JackServer | |||||
| JackSynchro** GetSynchroTable(); | JackSynchro** GetSynchroTable(); | ||||
| JackGraphManager* GetGraphManager(); | JackGraphManager* GetGraphManager(); | ||||
| void PrintState(); | |||||
| static JackServer* fInstance; // Unique instance | static JackServer* fInstance; // Unique instance | ||||
| }; | }; | ||||
| @@ -122,11 +122,6 @@ class JackThreadedDriver : public JackDriverClientInterface, public JackRunnable | |||||
| return fDriver->ProcessSlaves(); | return fDriver->ProcessSlaves(); | ||||
| } | } | ||||
| virtual void PrintState() | |||||
| { | |||||
| fDriver->PrintState(); | |||||
| } | |||||
| virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value) | virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value) | ||||
| { | { | ||||
| return fDriver->ClientNotify(refnum, name, notify, sync, value); | return fDriver->ClientNotify(refnum, name, notify, sync, value); | ||||
| @@ -237,8 +237,6 @@ jack_cleanup_files(const char *server_name) | |||||
| } | } | ||||
| } | } | ||||
| #ifdef FORK_SERVER | |||||
| int main(int argc, char* argv[]) | int main(int argc, char* argv[]) | ||||
| { | { | ||||
| int sig; | int sig; | ||||
| @@ -518,51 +516,3 @@ int main(int argc, char* argv[]) | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| #else | |||||
| int main(int argc, char* argv[]) | |||||
| { | |||||
| char c; | |||||
| long sample_sate = lopt(argv, "-r", 44100); | |||||
| long buffer_size = lopt(argv, "-p", 512); | |||||
| long chan_in = lopt(argv, "-i", 2); | |||||
| long chan_out = lopt(argv, "-o", 2); | |||||
| long audiodevice = lopt(argv, "-I", -1); | |||||
| long sync = lopt(argv, "-s", 0); | |||||
| long timeout = lopt(argv, "-t", 100 * 1000); | |||||
| const char* name = flag(argv, "-n", "Built-in Audio"); | |||||
| long rt = lopt(argv, "-R", 0); | |||||
| verbose = lopt(argv, "-v", 0); | |||||
| copyright(stdout); | |||||
| usage(stdout); | |||||
| FilterSIGPIPE(); | |||||
| printf("jackdmp: sample_sate = %ld buffer_size = %ld chan_in = %ld chan_out = %ld name = %s sync-mode = %ld\n", | |||||
| sample_sate, buffer_size, chan_in, chan_out, name, sync); | |||||
| assert(buffer_size <= BUFFER_SIZE_MAX); | |||||
| int res = JackStart(sample_sate, buffer_size, chan_in, chan_out, name, audiodevice, sync, timeout, rt); | |||||
| if (res < 0) { | |||||
| jack_error("Cannot start server... exit"); | |||||
| JackDelete(); | |||||
| return 0; | |||||
| } | |||||
| while (((c = getchar()) != 'q')) { | |||||
| switch (c) { | |||||
| case 's': | |||||
| fServer->PrintState(); | |||||
| break; | |||||
| } | |||||
| } | |||||
| JackStop(); | |||||
| return 0; | |||||
| } | |||||
| #endif | |||||
| @@ -950,31 +950,6 @@ int JackCoreAudioDriver::SetBufferSize(jack_nframes_t buffer_size) | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| void JackCoreAudioDriver::PrintState() | |||||
| { | |||||
| std::cout << "JackCoreAudioDriver state" << std::endl; | |||||
| jack_port_id_t port_index; | |||||
| std::cout << "Input ports" << std::endl; | |||||
| for (int i = 0; i < fPlaybackChannels; i++) { | |||||
| port_index = fCapturePortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| std::cout << "Output ports" << std::endl; | |||||
| for (int i = 0; i < fCaptureChannels; i++) { | |||||
| port_index = fPlaybackPortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| } | |||||
| } // end of namespace | } // end of namespace | ||||
| @@ -116,8 +116,6 @@ class JackCoreAudioDriver : public JackAudioDriver | |||||
| int Write(); | int Write(); | ||||
| int SetBufferSize(jack_nframes_t buffer_size); | int SetBufferSize(jack_nframes_t buffer_size); | ||||
| void PrintState(); | |||||
| }; | }; | ||||
| } // end of namespace | } // end of namespace | ||||
| @@ -444,34 +444,6 @@ int JackPortAudioDriver::SetBufferSize(jack_nframes_t buffer_size) | |||||
| } | } | ||||
| } | } | ||||
| void JackPortAudioDriver::PrintState() | |||||
| { | |||||
| int i; | |||||
| std::cout << "JackPortAudioDriver state" << std::endl; | |||||
| jack_port_id_t port_index; | |||||
| std::cout << "Input ports" << std::endl; | |||||
| /* | |||||
| for (i = 0; i < fPlaybackChannels; i++) { | |||||
| port_index = fCapturePortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| std::cout << "Output ports" << std::endl; | |||||
| for (i = 0; i < fCaptureChannels; i++) { | |||||
| port_index = fPlaybackPortList[i]; | |||||
| JackPort* port = fGraphManager->GetPort(port_index); | |||||
| std::cout << port->GetName() << std::endl; | |||||
| if (fGraphManager->GetConnectionsNum(port_index)) {} | |||||
| } | |||||
| */ | |||||
| } | |||||
| } // end of namespace | } // end of namespace | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| @@ -82,8 +82,6 @@ class JackPortAudioDriver : public JackAudioDriver | |||||
| int Write(); | int Write(); | ||||
| int SetBufferSize(jack_nframes_t buffer_size); | int SetBufferSize(jack_nframes_t buffer_size); | ||||
| void PrintState(); | |||||
| }; | }; | ||||
| } // end of namespace | } // end of namespace | ||||