From 951b7f5e65dbc433ab66171ca2f3176d77c98692 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Tue, 13 Oct 2015 12:22:07 +0200 Subject: [PATCH] Catch another 'device not found' error code --- src/alsa/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/alsa/mod.rs b/src/alsa/mod.rs index dca18df..f6e9d61 100644 --- a/src/alsa/mod.rs +++ b/src/alsa/mod.rs @@ -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() }