From 643da8e2cef50549306587cfb4f8ee63424dbad0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 4 Oct 2005 07:35:35 +0000 Subject: [PATCH] Apply m_bIsCriticalSound permanently on play, so we don't start playing previously muted sounds when GetPlayOnlyCriticalSounds changes. Fixes background music playing for a split second in some sound drivers when start is pressed during attract. --- stepmania/src/RageSound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 04c1983a31..c0e29982b0 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -887,8 +887,6 @@ float RageSound::GetAbsoluteVolume() const { float f = m_Param.m_Volume; f *= SOUNDMAN->GetMixVolume(); - if( SOUNDMAN->GetPlayOnlyCriticalSounds() && !m_Param.m_bIsCriticalSound ) - f *= 0; return f; } @@ -915,6 +913,8 @@ RageTimer RageSound::GetStartTime() const void RageSound::SetParams( const RageSoundParams &p ) { m_Param = p; + if( !m_Param.m_bIsCriticalSound && SOUNDMAN->GetPlayOnlyCriticalSounds() ) + m_Param.m_Volume = 0; } RageSoundParams::StopMode_t RageSound::GetStopMode() const