src/audio/SDL_audio.c
changeset 262 ba5363e21df8
parent 252 e8157fcb3114
child 297 f6ffac90895c
--- a/src/audio/SDL_audio.c	Fri Jan 04 20:48:51 2002 +0000
+++ b/src/audio/SDL_audio.c	Wed Jan 09 16:04:58 2002 +0000
@@ -336,6 +336,11 @@
 	}
 	audio = current_audio;
 
+	if (audio->opened) {
+		SDL_SetError("Audio device is already opened");
+		return(-1);
+	}
+
 	/* Verify some parameters */
 	if ( desired->callback == NULL ) {
 		SDL_SetError("SDL_OpenAudio() passed a NULL callback");