i-rinat / apulse

PulseAudio emulation for ALSA
MIT License
609 stars 35 forks source link

Apulse does not work with alsa ioplug #108

Open dspdaemon opened 4 years ago

dspdaemon commented 4 years ago

Sometimes snd_pcm_hw_params_any() can return +1 when it succeeds. On my system io plugins return 1 and hw devices return 0 and both are successful returns. That probably means only a negative return is an error. The included patch fixes the issue, apulse-stream.c.diff.gz

i-rinat commented 4 years ago

Yeah, turns out snd_pcm_hw_params_any() may return positive values too.

I looked into ALSA library code, and they almost everywhere only treat negative values as errors. So in f9c02f4639070ccea788a8097e4aa7a9bfeec435 I'm changing all != 0 for error codes from ALSA to < 0 too. That patch includes yours.