Skip to content

Commit

Permalink
Open the ALSA devices in non-blocking mode (thanks Aleksey!)
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 17, 2002
1 parent 62d0239 commit 5db97bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -74,7 +74,7 @@ static int Audio_Available(void)
snd_pcm_t *handle;

available = 0;
status = snd_pcm_open(&handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, 0);
status = snd_pcm_open(&handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if ( status >= 0 ) {
available = 1;
snd_pcm_close(handle);
Expand Down Expand Up @@ -202,7 +202,7 @@ static int ALSA_OpenAudio(_THIS, SDL_AudioSpec *spec)
Uint16 test_format;

/* Open the audio device */
status = snd_pcm_open(&pcm_handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, 0);
status = snd_pcm_open(&pcm_handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if ( status < 0 ) {
SDL_SetError("Couldn't open audio device: %s", snd_strerror(status));
return(-1);
Expand Down

0 comments on commit 5db97bf

Please sign in to comment.