diff --git a/ChangeLog b/ChangeLog index 34a3b6cf..2e7e3a61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ Fernando Lopez-Lezcano * Use of placement new for dynamic port allocation is possibly not safe... so avoid that until a definitive answer is found. * Cleanup. + * JackAudioDriver::ProcessAsync and JackAudioDriver::ProcessSync were broken at some point : 0 has to be returned in all cases. 2008-05-16 Stephane Letz diff --git a/common/JackAudioDriver.cpp b/common/JackAudioDriver.cpp index adc28dd4..90ffb668 100644 --- a/common/JackAudioDriver.cpp +++ b/common/JackAudioDriver.cpp @@ -186,14 +186,16 @@ synchronize to the end of client graph execution. int JackAudioDriver::ProcessAsync() { - if (Read() < 0) { // Read input buffers for the current cycle + // Read input buffers for the current cycle + if (Read() < 0) { jack_error("ProcessAsync: read error, skip cycle"); - return -1; + return 0; // Skip cycle, but continue processing... } - if (Write() < 0) { // Write output buffers from the previous cycle + // Write output buffers from the previous cycle + if (Write() < 0) { jack_error("ProcessAsync: write error, skip cycle"); - return -1; + return 0; // Skip cycle, but continue processing... } if (fIsMaster) { @@ -215,9 +217,10 @@ output buffers computed at the *current cycle* are used. int JackAudioDriver::ProcessSync() { - if (Read() < 0) { // Read input buffers for the current cycle + // Read input buffers for the current cycle + if (Read() < 0) { jack_error("ProcessSync: read error, skip cycle"); - return -1; + return 0; // Skip cycle, but continue processing... } if (fIsMaster) { @@ -232,9 +235,10 @@ int JackAudioDriver::ProcessSync() jack_error("ProcessSync: error"); } - if (Write() < 0) { // Write output buffers for the current cycle + // Write output buffers for the current cycle + if (Write() < 0) { jack_error("ProcessSync: write error, skip cycle"); - return -1; + return 0; // Skip cycle, but continue processing... } } else { diff --git a/common/JackDebugClient.cpp b/common/JackDebugClient.cpp index c3a7a6d5..f527c370 100644 --- a/common/JackDebugClient.cpp +++ b/common/JackDebugClient.cpp @@ -427,7 +427,7 @@ int JackDebugClient::SetProcessCallback(JackProcessCallback callback, void *arg) CheckClient(); fProcessTimeCallback = callback; fProcessTimeCallbackArg = arg; - return fClient->SetProcessCallback(TimeCallback, this); + return fClient->SetProcessCallback(TimeCallback, this); } int JackDebugClient::SetXRunCallback(JackXRunCallback callback, void *arg)