changeset 3845:ee5dfa7f7993 SDL-ryan-multiple-audio-device

ALSA's availability test was wrong in multi-device land. If the ALSA libraries are available, we should use them and report zero available devices instead.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 17 Oct 2006 08:04:51 +0000
parents 332a59e39ce1
children 66fb40445587
files src/audio/alsa/SDL_alsa_audio.c
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/alsa/SDL_alsa_audio.c	Tue Oct 17 06:45:17 2006 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.c	Tue Oct 17 08:04:51 2006 +0000
@@ -221,17 +221,9 @@
 ALSA_Available(void)
 {
     int available = 0;
-    int status;
-    snd_pcm_t *handle;
 
     if (LoadALSALibrary() >= 0) {
-        int status = ALSA_snd_pcm_open(&handle, get_audio_device(2),
-                                       SND_PCM_STREAM_PLAYBACK,
-                                       SND_PCM_NONBLOCK);
-        if (status >= 0) {
-            available = 1;
-            ALSA_snd_pcm_close(handle);
-        }
+        available = 1;
         UnloadALSALibrary();
     }
     return (available);