Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
ALSA's availability test was wrong in multi-device land. If the ALSA …
Browse files Browse the repository at this point in the history
…libraries

 are available, we should use them and report zero available devices instead.
  • Loading branch information
icculus committed Oct 17, 2006
1 parent 90ce5d0 commit 20d2eae
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -221,17 +221,9 @@ static int
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);
Expand Down

0 comments on commit 20d2eae

Please sign in to comment.