# HG changeset patch # User Sam Lantinga # Date 1010592298 0 # Node ID ba5363e21df8c0742b9367993c0aa0875b45d560 # Parent 1c5f68da5fc2d7b5ef16bf2b3e3208813df14fdb Don't allow multiple audio opens to succeed (until SDL 1.3) diff -r 1c5f68da5fc2 -r ba5363e21df8 src/audio/SDL_audio.c --- 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");