Scale background playback speed by song rate. This sync isn't very accurate though (because of inaccurate playback rate code in sound library?)

This commit is contained in:
Chris Danford
2003-04-14 04:54:16 +00:00
parent fb048fc9c7
commit cded5dbac0
4 changed files with 14 additions and 0 deletions
+6
View File
@@ -54,6 +54,9 @@ void BGAnimationLayer::Unload()
void BGAnimationLayer::Init()
{
Unload();
m_fUpdateRate = 1;
// m_bCycleColor = false;
// m_bCycleAlpha = false;
// m_Effect = EFFECT_STRETCH_STILL;
@@ -593,6 +596,8 @@ float BGAnimationLayer::GetMaxTweenTimeLeft() const
void BGAnimationLayer::Update( float fDeltaTime )
{
fDeltaTime *= m_fUpdateRate;
const float fSongBeat = GAMESTATE->m_fSongBeat;
unsigned i;
@@ -869,6 +874,7 @@ void BGAnimationLayer::SetDiffuse( RageColor c )
void BGAnimationLayer::GainingFocus( float fRate, bool bRewindMovie, bool bLoop )
{
m_fUpdateRate = m_fRate;
m_Sprites.back()->GetTexture()->SetPlaybackRate(fRate);
if( bRewindMovie )
m_Sprites[0]->GetTexture()->SetPosition( 0 );