There is an issue with `pulse_delay()` which calls
`pa_stream_get_latency()`. PulseAudio documents that this function
returns `-PA_ERR_NODATA` when timing information is not available yet.
The ALSA Pulse plugin compares the result against positive
`PA_ERR_NODATA`; it therefore treats that temporary condition as an
unrelated failure and returns `-EIO`.
Change `PA_ERR_NODATA` to `-PA_ERR_NODATA` in the comparison to not miss
that branch.
Fixes #65.
Closes: https://github.com/alsa-project/alsa-plugins/pull/67
Signed-off-by: argothiel <argothiel_alsa@interia.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
err = pa_stream_get_latency(pcm->stream, &lat, NULL);
if (err) {
- if (err != PA_ERR_NODATA) {
+ if (err != -PA_ERR_NODATA) {
err = -EIO;
goto finish;
}