deal with music rate changes

This commit is contained in:
Glenn Maynard
2007-06-12 18:33:32 +00:00
parent f8cd2c393f
commit 460c0c4412
+6 -3
View File
@@ -1524,15 +1524,18 @@ void ScreenGameplay::Update( float fDeltaTime )
pi->m_SoundEffectControl.Update( fDeltaTime ); pi->m_SoundEffectControl.Update( fDeltaTime );
} }
if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f )
{ {
float fSpeed = GetHasteRate(); float fSpeed = GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate;
fSpeed *= GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate; if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f )
fSpeed *= GetHasteRate();
RageSoundParams p = m_pSoundMusic->GetParams(); RageSoundParams p = m_pSoundMusic->GetParams();
if( fabsf(p.m_fSpeed - fSpeed) > 0.01f )
{
p.m_fSpeed = fSpeed; p.m_fSpeed = fSpeed;
m_pSoundMusic->SetParams( p ); m_pSoundMusic->SetParams( p );
} }
}
switch( m_DancingState ) switch( m_DancingState )
{ {