ALSA's availability test was wrong in multi-device land. If the ALSA libraries SDL-ryan-multiple-audio-device
authorRyan C. Gordon <icculus@icculus.org>
Tue, 17 Oct 2006 08:04:51 +0000
branchSDL-ryan-multiple-audio-device
changeset 3845 ee5dfa7f7993
parent 3844 332a59e39ce1
child 3846 66fb40445587
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.
src/audio/alsa/SDL_alsa_audio.c
--- 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);