summaryrefslogtreecommitdiff
path: root/common/JackAudioDriver.cpp
diff options
context:
space:
mode:
authorsletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224>2010-11-03 17:48:53 +0000
committersletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224>2010-11-03 17:48:53 +0000
commit7dfb47b0672c93303d97dc040c7372d8b33abc5c (patch)
treeae3dc3a5ed426751a69e8675989c13e41358e58a /common/JackAudioDriver.cpp
parent8ba6f04562f506242b2d571fd4c63ca32f3b2cc7 (diff)
downloadjack2-7dfb47b0672c93303d97dc040c7372d8b33abc5c.tar.gz
Improve backend error handling: fatal error returned by Read/Write now cause a Process failure (so a thread exit for blocking backends). Recoverable ones (XRuns..) are now treated internally in ALSA, FreeBob and FFADO backends.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4079 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'common/JackAudioDriver.cpp')
-rw-r--r--common/JackAudioDriver.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/common/JackAudioDriver.cpp b/common/JackAudioDriver.cpp
index dc53077c..72db9c7f 100644
--- a/common/JackAudioDriver.cpp
+++ b/common/JackAudioDriver.cpp
@@ -215,14 +215,14 @@ int JackAudioDriver::ProcessAsync()
{
// Read input buffers for the current cycle
if (Read() < 0) {
- jack_error("JackAudioDriver::ProcessAsync: read error, skip cycle");
- return 0; // Skip cycle, but continue processing...
+ jack_error("JackAudioDriver::ProcessAsync: read error, stopping...");
+ return -1;
}
// Write output buffers from the previous cycle
if (Write() < 0) {
- jack_error("JackAudioDriver::ProcessAsync: write error, skip cycle");
- return 0; // Skip cycle, but continue processing...
+ jack_error("JackAudioDriver::ProcessAsync: write error, stopping...");
+ return -1;
}
if (fIsMaster) {
@@ -244,9 +244,9 @@ output buffers computed at the *current cycle* are used.
int JackAudioDriver::ProcessSync()
{
// Read input buffers for the current cycle
- if (Read() < 0) {
- jack_error("JackAudioDriver::ProcessSync: read error, skip cycle");
- return 0; // Skip cycle, but continue processing...
+ if (Read() < 0) {
+ jack_error("JackAudioDriver::ProcessSync: read error, stopping...");
+ return -1;
}
if (fIsMaster) {
@@ -255,10 +255,10 @@ int JackAudioDriver::ProcessSync()
fGraphManager->ResumeRefNum(&fClientControl, fSynchroTable);
}
- // Write output buffers for the current cycle
- if (Write() < 0) {
- jack_error("JackAudioDriver::ProcessSync: write error, skip cycle");
- return 0; // Skip cycle, but continue processing...
+ // Write output buffers from the previous cycle
+ if (Write() < 0) {
+ jack_error("JackAudioDriver::ProcessSync: write error, stopping...");
+ return -1;
}
// Keep end cycle time