From f741db3f7d6883b6743c8a05741e21a835eeee53 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 17 Nov 2002 20:01:54 +0000 Subject: [PATCH] Open the ALSA devices in non-blocking mode (thanks Aleksey!) --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40548 --- src/audio/alsa/SDL_alsa_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index cb640e92..b147480a 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -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); @@ -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);