thestk / rtaudio

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k stars 318 forks source link

`RtApiAlsa::startStream()`, `stopStream()`, and `abortStream()` return RTAUDIO_SYSTEM_ERROR on success #342

Closed AndrewBelt closed 2 years ago

AndrewBelt commented 2 years ago

I believe this is caused by a typo in each of these functions when checking the result variable. ALSA functions return negative on error and 0 on success. if (result >= 0) should be if (result < 0). e.g. https://github.com/thestk/rtaudio/blob/f9fd8726ccb688baa43aaae642179a69d353f6d2/RtAudio.cpp#L8280

garyscavone commented 2 years ago

Yes, that is a bug. I fixed it in the newdeviceselection branch but not in master. If someone has time to do it, please make a PR.

garyscavone commented 2 years ago

I just fixed this.