bugfix issue #269 jttl_audio segfaults on exit due to incorrectly ordered shutdown code. From Muellhierrein

This commit is contained in:
Richard Goedeken 2009-09-29 01:40:33 +00:00
parent 07d52d1967
commit 88dde422ac

View file

@ -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);