andrewrk / libsoundio

C library for cross-platform real-time audio input and output
http://libsound.io/
MIT License
1.93k stars 228 forks source link

Detect unsupported sample formats for PulseAudio #250

Open voidumbrella opened 3 years ago

voidumbrella commented 3 years ago

With the PulseAudio backend, attempting to open a stream with an unsupported sample format confusingly returns SoundIoErrorNoMem. An explicit check is added to test for PA_FORMAT_INVALID and return a more appropriate error.