Commit f26ea247 authored by Stephane Letz's avatar Stephane Letz
Browse files

Add missing methods in JackDebugClient(2).

parent 0840eed8
......@@ -451,10 +451,11 @@ int JackDebugClient::TimeCallback(jack_nframes_t nframes, void *arg)
jack_time_t t1 = GetMicroSeconds();
int res = client->fProcessTimeCallback(nframes, client->fProcessTimeCallbackArg);
if (res == 0) {
jack_time_t t2 = GetMicroSeconds();
jack_time_t t2 = GetMicroSeconds();
long delta = long((t2 - t1) - client->GetEngineControl()->fPeriodUsecs);
if (delta > 0 && !client->fFreewheel)
if (delta > 0 && !client->fFreewheel) {
*client->fStream << "!!! ERROR !!! : Process overload of " << delta << " us" << endl;
}
}
return res;
}
......@@ -462,9 +463,17 @@ int JackDebugClient::TimeCallback(jack_nframes_t nframes, void *arg)
int JackDebugClient::SetProcessCallback(JackProcessCallback callback, void *arg)
{
CheckClient("SetProcessCallback");
fProcessTimeCallback = callback;
fProcessTimeCallbackArg = arg;
return fClient->SetProcessCallback(TimeCallback, this);
if (callback == NULL) {
// Clear the callback...
return fClient->SetProcessCallback(callback, arg);
} else {
// Setup the measuring version...
return fClient->SetProcessCallback(TimeCallback, this);
}
}
int JackDebugClient::SetXRunCallback(JackXRunCallback callback, void *arg)
......@@ -539,7 +548,6 @@ int JackDebugClient::SetProcessThread(JackThreadCallback fun, void *arg)
return fClient->SetProcessThread(fun, arg);
}
jack_session_command_t* JackDebugClient::SessionNotify(const char* target, jack_session_event_type_t type, const char* path)
{
CheckClient("SessionNotify");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment