Commit a7215581 authored by Sam Lantinga's avatar Sam Lantinga

Don't allow multiple audio opens to succeed (until SDL 1.3)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40263
parent 551057f9
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment