From 8826f57b3955082377a0e2d6996ce80931d26639 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 19 Dec 2002 01:30:19 +0000 Subject: [PATCH] fix locking --- stepmania/src/RageSound.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 192532e5c1..51e278c24d 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -575,10 +575,9 @@ void RageSound::SetPlaybackRate( float fScale ) /* This is used to start music. It probably belongs in RageSoundManager. */ void RageSound::LoadAndPlayIfNotAlready( CString sSoundFilePath ) { - SOUNDMAN->lock.Lock(); + LockMutex L(SOUNDMAN->lock); if( GetLoadedFilePath() == sSoundFilePath && IsPlaying() ) return; // do nothing - SOUNDMAN->lock.Unlock(); Load( sSoundFilePath ); SetLooping();