alsa: force playback start when buffer is full

When we try to play data but the ringbuffer is full, we need to start
the device or else we will stay in this situation forever and stay
silent.

Fixes #2830
This commit is contained in:
Wim Taymans 2022-11-16 20:45:38 +01:00
parent 50a24ac69e
commit b46d8a8c92

View file

@ -2128,7 +2128,7 @@ again:
state->sample_count += total_written;
if (SPA_UNLIKELY(!state->alsa_started && total_written > 0))
if (SPA_UNLIKELY(!state->alsa_started && (total_written > 0 || frames == 0)))
do_start(state);
return 0;