From 460c0c44122a67bad47422485a781248ce13829b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 12 Jun 2007 18:33:32 +0000 Subject: [PATCH] deal with music rate changes --- stepmania/src/ScreenGameplay.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index c47605b7e2..65a3bf33e4 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1524,14 +1524,17 @@ void ScreenGameplay::Update( float fDeltaTime ) pi->m_SoundEffectControl.Update( fDeltaTime ); } - if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f ) { - float fSpeed = GetHasteRate(); - fSpeed *= GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate; + float fSpeed = GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate; + if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f ) + fSpeed *= GetHasteRate(); RageSoundParams p = m_pSoundMusic->GetParams(); - p.m_fSpeed = fSpeed; - m_pSoundMusic->SetParams( p ); + if( fabsf(p.m_fSpeed - fSpeed) > 0.01f ) + { + p.m_fSpeed = fSpeed; + m_pSoundMusic->SetParams( p ); + } } switch( m_DancingState )