Browse Source

JackAudioDriver::ProcessAsync and JackAudioDriver::ProcessSync were broken at some point : 0 has to be returned in all cases.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2288 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
600877ee86
3 changed files with 14 additions and 9 deletions
  1. +1
    -0
      ChangeLog
  2. +12
    -8
      common/JackAudioDriver.cpp
  3. +1
    -1
      common/JackDebugClient.cpp

+ 1
- 0
ChangeLog View File

@@ -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 <letz@grame.fr>



+ 12
- 8
common/JackAudioDriver.cpp View File

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


+ 1
- 1
common/JackDebugClient.cpp View File

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


Loading…
Cancel
Save