output/alsa: hold back snd_pcm_writei() until period_buffer is full
This gives MPD more control, because attempts to avoid having partial periods in the ALSA period buffer. For example, this means that DrainInternal() doesn't need to generate silence to fill the partial period.
This commit is contained in:
parent
e9190f4249
commit
9fc1668de3
|
@ -956,7 +956,7 @@ try {
|
|||
|
||||
CopyRingToPeriodBuffer();
|
||||
|
||||
if (period_buffer.IsEmpty()) {
|
||||
if (!period_buffer.IsFull()) {
|
||||
if (snd_pcm_state(pcm) == SND_PCM_STATE_PREPARED ||
|
||||
snd_pcm_avail(pcm) <= max_avail_frames) {
|
||||
/* at SND_PCM_STATE_PREPARED (not yet switched
|
||||
|
|
Loading…
Reference in New Issue