Skip to content
Permalink
Browse files
Don't allow multiple audio opens to succeed (until SDL 1.3)
  • Loading branch information
slouken committed Jan 9, 2002
1 parent cddd7d5 commit 2a074cf7f2b2c2af344e8b9c2446a000b7053f38
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/audio/SDL_audio.c
@@ -336,6 +336,11 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
}
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");

0 comments on commit 2a074cf

Please sign in to comment.