Open the ALSA devices in non-blocking mode (thanks Aleksey!)
authorSam Lantinga <slouken@libsdl.org>
Sun, 17 Nov 2002 20:01:54 +0000
changeset 5475d07f9a47f17
parent 546 0009aadb3d01
child 548 6cd49f896c5a
Open the ALSA devices in non-blocking mode (thanks Aleksey!)
src/audio/alsa/SDL_alsa_audio.c
     1.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Sun Nov 17 19:36:49 2002 +0000
     1.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Sun Nov 17 20:01:54 2002 +0000
     1.3 @@ -74,7 +74,7 @@
     1.4  	snd_pcm_t *handle;
     1.5  
     1.6  	available = 0;
     1.7 -	status = snd_pcm_open(&handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, 0);
     1.8 +	status = snd_pcm_open(&handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
     1.9  	if ( status >= 0 ) {
    1.10  		available = 1;
    1.11          	snd_pcm_close(handle);
    1.12 @@ -202,7 +202,7 @@
    1.13  	Uint16               test_format;
    1.14  
    1.15  	/* Open the audio device */
    1.16 -	status = snd_pcm_open(&pcm_handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, 0);
    1.17 +	status = snd_pcm_open(&pcm_handle, get_audio_device(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
    1.18  	if ( status < 0 ) {
    1.19  		SDL_SetError("Couldn't open audio device: %s", snd_strerror(status));
    1.20  		return(-1);