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:
@@ -267,6 +267,8 @@ AlsaInputStream::Recover(int err)
|
|||||||
case SND_PCM_STATE_SETUP:
|
case SND_PCM_STATE_SETUP:
|
||||||
case SND_PCM_STATE_XRUN:
|
case SND_PCM_STATE_XRUN:
|
||||||
err = snd_pcm_prepare(capture_handle);
|
err = snd_pcm_prepare(capture_handle);
|
||||||
|
if (err == 0)
|
||||||
|
err = snd_pcm_start(capture_handle);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SND_PCM_STATE_DISCONNECTED:
|
case SND_PCM_STATE_DISCONNECTED:
|
||||||
|
Reference in New Issue
Block a user