int JackMidiDriver::ProcessReadAsync() { int res = 0; jack_log("JackMidiDriver::ProcessReadAsync"); // Read input buffers for the current cycle if (Read() < 0) { jack_error("JackMidiDriver::ProcessReadAsync: read error"); res = -1; } // Write output buffers from the previous cycle if (Write() < 0) { jack_error("JackMidiDriver::ProcessReadAsync: write error"); res = -1; } if (ResumeRefNum() < 0) { jack_error("JackMidiDriver::ProcessReadAsync: ResumeRefNum error"); res = -1; } return res; }
int JackMidiDriver::ProcessReadSync() { int res = 0; // Read input buffers for the current cycle if (Read() < 0) { jack_error("JackMidiDriver::ProcessReadSync: read error"); res = -1; } if (ResumeRefNum() < 0) { jack_error("JackMidiDriver::ProcessReadSync: ResumeRefNum error"); res = -1; } return res; }
int JackLoopbackDriver::ProcessReadAsync() { int res = 0; // Loopback copy for (int i = 0; i < fCaptureChannels; i++) { memcpy(GetInputBuffer(i), GetOutputBuffer(i), sizeof(jack_default_audio_sample_t) * fEngineControl->fBufferSize); } // Resume connected clients in the graph if (ResumeRefNum() < 0) { jack_error("JackLoopbackDriver::ProcessReadAsync - ResumeRefNum error"); res = -1; } return res; }