Don't allow multiple audio opens to succeed (until SDL 1.3)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40263
This commit is contained in:
parent
551057f96e
commit
a7215581c7
1 changed files with 5 additions and 0 deletions
|
@ -336,6 +336,11 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
|
||||||
}
|
}
|
||||||
audio = current_audio;
|
audio = current_audio;
|
||||||
|
|
||||||
|
if (audio->opened) {
|
||||||
|
SDL_SetError("Audio device is already opened");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Verify some parameters */
|
/* Verify some parameters */
|
||||||
if ( desired->callback == NULL ) {
|
if ( desired->callback == NULL ) {
|
||||||
SDL_SetError("SDL_OpenAudio() passed a NULL callback");
|
SDL_SetError("SDL_OpenAudio() passed a NULL callback");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue