Don't allow multiple audio opens to succeed (until SDL 1.3)
authorSam Lantinga <slouken@libsdl.org>
Wed, 09 Jan 2002 16:04:58 +0000
changeset 262ba5363e21df8
parent 261 1c5f68da5fc2
child 263 63e391bd7085
Don't allow multiple audio opens to succeed (until SDL 1.3)
src/audio/SDL_audio.c
     1.1 --- a/src/audio/SDL_audio.c	Fri Jan 04 20:48:51 2002 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Wed Jan 09 16:04:58 2002 +0000
     1.3 @@ -336,6 +336,11 @@
     1.4  	}
     1.5  	audio = current_audio;
     1.6  
     1.7 +	if (audio->opened) {
     1.8 +		SDL_SetError("Audio device is already opened");
     1.9 +		return(-1);
    1.10 +	}
    1.11 +
    1.12  	/* Verify some parameters */
    1.13  	if ( desired->callback == NULL ) {
    1.14  		SDL_SetError("SDL_OpenAudio() passed a NULL callback");