Browse Source

Better error report.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4606 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 13 years ago
parent
commit
e3e95e08ca
2 changed files with 13 additions and 9 deletions
  1. +7
    -7
      common/JackMidiDriver.cpp
  2. +6
    -2
      macosx/coremidi/JackCoreMidiDriver.cpp

+ 7
- 7
common/JackMidiDriver.cpp View File

@@ -149,12 +149,12 @@ int JackMidiDriver::ProcessReadSync()


// Read input buffers for the current cycle // Read input buffers for the current cycle
if (Read() < 0) { if (Read() < 0) {
jack_error("JackMidiDriver::ProcessReadSync: read error, skip cycle");
jack_error("JackMidiDriver::ProcessReadSync: read error");
res = -1; res = -1;
} }


if (fGraphManager->ResumeRefNum(&fClientControl, fSynchroTable) < 0) { if (fGraphManager->ResumeRefNum(&fClientControl, fSynchroTable) < 0) {
jack_error("JackMidiDriver::ProcessReadSync - ResumeRefNum error");
jack_error("JackMidiDriver::ProcessReadSync: ResumeRefNum error");
res = -1; res = -1;
} }


@@ -168,13 +168,13 @@ int JackMidiDriver::ProcessWriteSync()
if (fGraphManager->SuspendRefNum(&fClientControl, fSynchroTable, if (fGraphManager->SuspendRefNum(&fClientControl, fSynchroTable,
DRIVER_TIMEOUT_FACTOR * DRIVER_TIMEOUT_FACTOR *
fEngineControl->fTimeOutUsecs) < 0) { fEngineControl->fTimeOutUsecs) < 0) {
jack_error("JackMidiDriver::ProcessWriteSync - SuspendRefNum error");
jack_error("JackMidiDriver::ProcessWriteSync: SuspendRefNum error");
res = -1; res = -1;
} }


// Write output buffers from the current cycle // Write output buffers from the current cycle
if (Write() < 0) { if (Write() < 0) {
jack_error("JackMidiDriver::ProcessWriteSync - Write error");
jack_error("JackMidiDriver::ProcessWriteSync: write error");
res = -1; res = -1;
} }


@@ -187,18 +187,18 @@ int JackMidiDriver::ProcessReadAsync()


// Read input buffers for the current cycle // Read input buffers for the current cycle
if (Read() < 0) { if (Read() < 0) {
jack_error("JackMidiDriver::ProcessReadAsync: read error, skip cycle");
jack_error("JackMidiDriver::ProcessReadAsync: read error");
res = -1; res = -1;
} }


// Write output buffers from the previous cycle // Write output buffers from the previous cycle
if (Write() < 0) { if (Write() < 0) {
jack_error("JackMidiDriver::ProcessReadAsync - Write error");
jack_error("JackMidiDriver::ProcessReadAsync: write error");
res = -1; res = -1;
} }


if (fGraphManager->ResumeRefNum(&fClientControl, fSynchroTable) < 0) { if (fGraphManager->ResumeRefNum(&fClientControl, fSynchroTable) < 0) {
jack_error("JackMidiDriver::ProcessReadAsync - ResumeRefNum error");
jack_error("JackMidiDriver::ProcessReadAsync: ResumeRefNum error");
res = -1; res = -1;
} }




+ 6
- 2
macosx/coremidi/JackCoreMidiDriver.cpp View File

@@ -701,8 +701,10 @@ JackCoreMidiDriver::Read()
ProcessJack(GetInputBuffer(num_physical_inputs + i), buffer_size); ProcessJack(GetInputBuffer(num_physical_inputs + i), buffer_size);
} }
Unlock(); Unlock();
return 0;
} else {
return -1;
} }
return 0;
} }


int int
@@ -719,8 +721,10 @@ JackCoreMidiDriver::Write()
buffer_size); buffer_size);
} }
Unlock(); Unlock();
return 0;
} else {
return -1;
} }
return 0;
} }


#ifdef __cplusplus #ifdef __cplusplus


Loading…
Cancel
Save