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 3845ee5dfa7f7993
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
     1.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Tue Oct 17 06:45:17 2006 +0000
     1.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Tue Oct 17 08:04:51 2006 +0000
     1.3 @@ -221,17 +221,9 @@
     1.4  ALSA_Available(void)
     1.5  {
     1.6      int available = 0;
     1.7 -    int status;
     1.8 -    snd_pcm_t *handle;
     1.9  
    1.10      if (LoadALSALibrary() >= 0) {
    1.11 -        int status = ALSA_snd_pcm_open(&handle, get_audio_device(2),
    1.12 -                                       SND_PCM_STREAM_PLAYBACK,
    1.13 -                                       SND_PCM_NONBLOCK);
    1.14 -        if (status >= 0) {
    1.15 -            available = 1;
    1.16 -            ALSA_snd_pcm_close(handle);
    1.17 -        }
    1.18 +        available = 1;
    1.19          UnloadALSALibrary();
    1.20      }
    1.21      return (available);