Browse Source

Cleanup

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1569 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.67
sletz 18 years ago
parent
commit
4ed0dd094d
18 changed files with 0 additions and 281 deletions
  1. +0
    -1
      common/JackConnectionManager.h
  2. +0
    -5
      common/JackDriver.h
  3. +0
    -25
      common/JackDummyDriver.cpp
  4. +0
    -1
      common/JackDummyDriver.h
  5. +0
    -18
      common/JackEngine.cpp
  6. +0
    -2
      common/JackEngine.h
  7. +0
    -82
      common/JackEngineTiming.cpp
  8. +0
    -1
      common/JackEngineTiming.h
  9. +0
    -25
      common/JackLoopbackDriver.cpp
  10. +0
    -1
      common/JackLoopbackDriver.h
  11. +0
    -6
      common/JackServer.cpp
  12. +0
    -2
      common/JackServer.h
  13. +0
    -5
      common/JackThreadedDriver.h
  14. +0
    -50
      common/Jackdmp.cpp
  15. +0
    -25
      macosx/JackCoreAudioDriver.cpp
  16. +0
    -2
      macosx/JackCoreAudioDriver.h
  17. +0
    -28
      windows/JackPortAudioDriver.cpp
  18. +0
    -2
      windows/JackPortAudioDriver.h

+ 0
- 1
common/JackConnectionManager.h View File

@@ -456,7 +456,6 @@ class JackConnectionManager
void ResetGraph(JackClientTiming* timing);
int ResumeRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing);
int SuspendRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing, long time_out_usec);

};

} // end of namespace


+ 0
- 5
common/JackDriver.h View File

@@ -82,8 +82,6 @@ class EXPORT JackDriverInterface
virtual int ProcessSlaves() = 0;

virtual bool IsRealTime() = 0;

virtual void PrintState() = 0;
};

/*!
@@ -201,9 +199,6 @@ class EXPORT JackDriver : public JackDriverClient

virtual bool IsRealTime();

virtual void PrintState()
{}

int ClientNotify(int refnum, const char* name, int notify, int sync, int value)
{
return 0;


+ 0
- 25
common/JackDummyDriver.cpp View File

@@ -66,31 +66,6 @@ int JackDummyDriver::Process()
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

#ifdef __cplusplus


+ 0
- 1
common/JackDummyDriver.h View File

@@ -59,7 +59,6 @@ class JackDummyDriver : public JackAudioDriver
jack_nframes_t playback_latency);

int Process();
void PrintState();
};

} // end of namespace


+ 0
- 18
common/JackEngine.cpp View File

@@ -745,23 +745,5 @@ int JackEngine::SetTimebaseCallback(int refnum, int 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


+ 0
- 2
common/JackEngine.h View File

@@ -120,8 +120,6 @@ class JackEngine
void NotifyFreewheel(bool onoff);
void NotifyPortRegistation(jack_port_id_t port_index, bool onoff);
void NotifyActivate(int refnum);

void PrintState();
};




+ 0
- 82
common/JackEngineTiming.cpp View File

@@ -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()
{
for (int i = 0; i < TIME_POINTS; i++) {


+ 0
- 1
common/JackEngineTiming.h View File

@@ -96,7 +96,6 @@ class JackEngineTiming
void ResetRollingUsecs();

void ClearTimeMeasures();
void PrintState();
};

} // end of namespace


+ 0
- 25
common/JackLoopbackDriver.cpp View File

@@ -50,31 +50,6 @@ int JackLoopbackDriver::Process()
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

/*


+ 0
- 1
common/JackLoopbackDriver.h View File

@@ -43,7 +43,6 @@ class JackLoopbackDriver : public JackAudioDriver
{}

int Process();
void PrintState();
};

} // end of namespace


+ 0
- 6
common/JackServer.cpp View File

@@ -296,11 +296,5 @@ JackGraphManager* JackServer::GetGraphManager()
return fGraphManager;
}

void JackServer::PrintState()
{
fAudioDriver->PrintState();
fEngine->PrintState();
}

} // end of namespace


+ 0
- 2
common/JackServer.h View File

@@ -79,8 +79,6 @@ class EXPORT JackServer
JackSynchro** GetSynchroTable();
JackGraphManager* GetGraphManager();

void PrintState();

static JackServer* fInstance; // Unique instance
};



+ 0
- 5
common/JackThreadedDriver.h View File

@@ -122,11 +122,6 @@ class JackThreadedDriver : public JackDriverClientInterface, public JackRunnable
return fDriver->ProcessSlaves();
}

virtual void PrintState()
{
fDriver->PrintState();
}

virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value)
{
return fDriver->ClientNotify(refnum, name, notify, sync, value);


+ 0
- 50
common/Jackdmp.cpp View File

@@ -237,8 +237,6 @@ jack_cleanup_files(const char *server_name)
}
}

#ifdef FORK_SERVER

int main(int argc, char* argv[])
{
int sig;
@@ -518,51 +516,3 @@ int main(int argc, char* argv[])

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

+ 0
- 25
macosx/JackCoreAudioDriver.cpp View File

@@ -950,31 +950,6 @@ int JackCoreAudioDriver::SetBufferSize(jack_nframes_t buffer_size)
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




+ 0
- 2
macosx/JackCoreAudioDriver.h View File

@@ -116,8 +116,6 @@ class JackCoreAudioDriver : public JackAudioDriver
int Write();

int SetBufferSize(jack_nframes_t buffer_size);

void PrintState();
};

} // end of namespace


+ 0
- 28
windows/JackPortAudioDriver.cpp View File

@@ -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

#ifdef __cplusplus


+ 0
- 2
windows/JackPortAudioDriver.h View File

@@ -82,8 +82,6 @@ class JackPortAudioDriver : public JackAudioDriver
int Write();

int SetBufferSize(jack_nframes_t buffer_size);

void PrintState();
};

} // end of namespace


Loading…
Cancel
Save