diff src/audio/alsa/SDL_alsa_audio.c @ 547:5d07f9a47f17

Open the ALSA devices in non-blocking mode (thanks Aleksey!)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 17 Nov 2002 20:01:54 +0000
parents 5868b0f832f2
children 4c2ba6161939
line wrap: on
line diff
--- a/src/audio/alsa/SDL_alsa_audio.c	Sun Nov 17 19:36:49 2002 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.c	Sun Nov 17 20:01:54 2002 +0000
@@ -74,7 +74,7 @@
 	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 @@
 	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);