From e7393b0cbefbe949282a4425d9747dcd2ea716cd Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 18 Jan 2007 07:34:22 +0000 Subject: [PATCH] tihs is safe now --- stepmania/src/GameSoundManager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/stepmania/src/GameSoundManager.cpp b/stepmania/src/GameSoundManager.cpp index 7b15f2a40e..3dbd52f455 100644 --- a/stepmania/src/GameSoundManager.cpp +++ b/stepmania/src/GameSoundManager.cpp @@ -66,7 +66,7 @@ struct MusicPlaying ~MusicPlaying() { - SOUNDMAN->DeleteSound( m_Music ); + delete m_Music; } }; @@ -111,10 +111,7 @@ static void StartMusic( MusicToPlay &ToPlay ) g_Playing->m_Music = new RageSound; L.Unlock(); - /* We're not allowed to delete the sound in a separate thread, because - * RageSoundManager::FlushPosMapQueue might be running. Stop the sound, - * and give it to RageSoundManager to delete. */ - SOUNDMAN->DeleteSound( pOldSound ); + delete pOldSound; return; } @@ -331,7 +328,7 @@ static void StartQueuedSounds() g_Playing->m_Music = new RageSound; g_Mutex->Unlock(); - SOUNDMAN->DeleteSound( pOldSound ); + delete pOldSound; } } }