input/alsa: enable non-blocking mode

This commit is contained in:
Steven O'Brien 2017-01-13 21:04:05 +00:00 committed by Max Kellermann
parent 144312a525
commit 791efc171a
1 changed files with 2 additions and 1 deletions

View File

@ -367,7 +367,8 @@ AlsaInputStream::OpenDevice(const char *device,
snd_pcm_t *capture_handle;
int err;
if ((err = snd_pcm_open(&capture_handle, device,
SND_PCM_STREAM_CAPTURE, 0)) < 0)
SND_PCM_STREAM_CAPTURE,
SND_PCM_NONBLOCK)) < 0)
throw FormatRuntimeError("Failed to open device: %s (%s)",
device, snd_strerror(err));