input/alsa: call snd_pcm_start() after snd_pcm_prepare()

This is necessary because we'll never get woken up again by
epoll_wait() after a buffer overrun recovery, unless we start the PCM
explicitly before returning to the I/O loop.
This commit is contained in:
Max Kellermann 2017-01-14 20:58:21 +01:00
parent ef114ee6cb
commit 92684112ed
1 changed files with 2 additions and 0 deletions

View File

@ -267,6 +267,8 @@ AlsaInputStream::Recover(int err)
case SND_PCM_STATE_SETUP:
case SND_PCM_STATE_XRUN:
err = snd_pcm_prepare(capture_handle);
if (err == 0)
err = snd_pcm_start(capture_handle);
break;
case SND_PCM_STATE_DISCONNECTED: