mirror of
https://github.com/mupen64plus/mupen64plus-oldsvn.git
synced 2024-05-13 17:57:42 -04:00
bugfix issue #269 jttl_audio segfaults on exit due to incorrectly ordered shutdown code. From Muellhierrein
This commit is contained in:
parent
07d52d1967
commit
88dde422ac
|
@ -713,9 +713,10 @@ EXPORT void CALL RomClosed( void )
|
|||
return;
|
||||
printf("[JttL's SDL Audio plugin] Cleaning up SDL sound plugin...\n");
|
||||
|
||||
// Pause SDL Audio (Should be done before clean up)
|
||||
// Shut down SDL Audio output
|
||||
SDL_PauseAudio(1);
|
||||
|
||||
SDL_CloseAudio();
|
||||
|
||||
// Delete the buffer, as we are done producing sound
|
||||
if (buffer != NULL)
|
||||
{
|
||||
|
@ -733,9 +734,6 @@ EXPORT void CALL RomClosed( void )
|
|||
hardware_spec = NULL;
|
||||
buffer = NULL;
|
||||
|
||||
// Actually close the audio device
|
||||
SDL_CloseAudio();
|
||||
|
||||
// Shutdown the respective subsystems
|
||||
if(SDL_WasInit(SDL_INIT_AUDIO) != 0) SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
if(SDL_WasInit(SDL_INIT_TIMER) != 0) SDL_QuitSubSystem(SDL_INIT_TIMER);
|
||||
|
|
Loading…
Reference in a new issue