output/alsa: always redo DrainInternal() after writing

Draining isn't finished just because the period_buffer has run empty.
It is only finished after snd_pcm_drain() has succeeded.
This commit is contained in:
Max Kellermann 2019-06-28 08:27:48 +02:00
parent 543776d9c9
commit c926021599
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -5,6 +5,7 @@ ver 0.21.11 (not yet released)
- wildmidi: log error if library initialization fails
* output
- alsa: fix busy loop while draining
- alsa: fix missing drain call
- alsa, osx: fix distortions with DSD_U32 and DoP on 32 bit CPUs
* protocol
- fix "list" with multiple "group" levels

View File

@ -766,7 +766,7 @@ AlsaOutput::DrainInternal()
/* need to call CopyRingToPeriodBuffer() and
WriteFromPeriodBuffer() again in the next
iteration, so don't finish the drain just yet */
return period_buffer.IsEmpty();
return false;
}
if (!written)