From 0ed835685aa7034fb5ab2df5f3e1343df1c7bb74 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 13 Jan 2004 01:59:32 +0000 Subject: [PATCH] fix sound occasionally not stopping correctly --- stepmania/src/RageSounds.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stepmania/src/RageSounds.cpp b/stepmania/src/RageSounds.cpp index 30d7dd5962..0a933f5c4e 100644 --- a/stepmania/src/RageSounds.cpp +++ b/stepmania/src/RageSounds.cpp @@ -87,6 +87,9 @@ void StartPlayingQueuedMusic( const RageTimer &when, const MusicToPlay &ToPlay, void StartQueuedMusic( MusicToPlay &ToPlay ) { + if( ToPlay.file.empty() ) + return; + LockMutex L( *g_Mutex ); MusicPlaying *NewMusic = new MusicPlaying; NewMusic->m_Timing = g_Playing->m_Timing; @@ -297,10 +300,6 @@ void RageSounds::PlayMusic( const CString &file, const CString &timing_file, boo g_Playing->m_Music.Unload(); - /* If file is blank, just stop. */ - if( file.empty() ) - return; - MusicToPlay ToPlay; ToPlay.file = file;