diff options
| author | Gary Scavone <gary.scavone@mcgill.ca> | 2022-03-16 16:24:11 -0400 |
|---|---|---|
| committer | Gary Scavone <gary.scavone@mcgill.ca> | 2022-03-16 16:24:11 -0400 |
| commit | 23d4acc7365ae4a0a6f78c59f41b6d08276783b3 (patch) | |
| tree | 2de7de8e1d19e6951bdd70d74117aad74384462e /RtAudio.cpp | |
| parent | b8be0f36af08a674b894ca98966adccb27e5c9ee (diff) | |
Fixed RtApiAlsa start/stop/abort stream return values.
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index d8290e3..45cee9e 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -8293,7 +8293,7 @@ RtAudioErrorType RtApiAlsa :: startStream() pthread_cond_signal( &apiInfo->runnable_cv ); MUTEX_UNLOCK( &stream_.mutex ); - if ( result >= 0 ) return error( RTAUDIO_SYSTEM_ERROR ); + if ( result < 0 ) return error( RTAUDIO_SYSTEM_ERROR ); return RTAUDIO_NO_ERROR; } @@ -8338,7 +8338,7 @@ RtAudioErrorType RtApiAlsa :: stopStream() apiInfo->runnable = false; // fixes high CPU usage when stopped MUTEX_UNLOCK( &stream_.mutex ); - if ( result >= 0 ) return error( RTAUDIO_SYSTEM_ERROR ); + if ( result < 0 ) return error( RTAUDIO_SYSTEM_ERROR ); return RTAUDIO_NO_ERROR; } @@ -8380,7 +8380,7 @@ RtAudioErrorType RtApiAlsa :: abortStream() apiInfo->runnable = false; // fixes high CPU usage when stopped MUTEX_UNLOCK( &stream_.mutex ); - if ( result >= 0 ) return error( RTAUDIO_SYSTEM_ERROR ); + if ( result < 0 ) return error( RTAUDIO_SYSTEM_ERROR ); return RTAUDIO_NO_ERROR; } |
