Merge pull request #86 from mvdnes/alsa_nosound

Catch another 'device not found' error code with ALSA
This commit is contained in:
tomaka 2015-10-13 12:35:54 +02:00
commit bed1efcb5a
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ impl Endpoint {
match alsa::snd_pcm_open(&mut playback_handle, device_name.as_ptr() as *const _,
alsa::SND_PCM_STREAM_PLAYBACK, alsa::SND_PCM_NONBLOCK)
{
-2 |
-16 /* determined empirically */ => return Err(FormatsEnumerationError::DeviceNotAvailable),
e => check_errors(e).unwrap()
}