flush sound after first update

This commit is contained in:
Glenn Maynard
2005-02-07 07:41:31 +00:00
parent cba25bd409
commit ad59a32a69
+7
View File
@@ -147,6 +147,8 @@ void ScreenManager::Update( float fDeltaTime )
Screen* pScreen = m_ScreenStack.empty() ? NULL : GetTopScreen();
bool bFirstUpdate = pScreen && pScreen->IsFirstUpdate();
/* Loading a new screen can take seconds and cause a big jump on the new
* Screen's first update. Clamp the first update delta so that the
* animations don't jump. */
@@ -164,6 +166,11 @@ void ScreenManager::Update( float fDeltaTime )
m_SystemLayer->Update( fDeltaTime );
/* The music may be started on the first update. If we're reading from a CD,
* it might not start immediately. Make sure we start playing the sound before
* continuing, since it's strange to start rendering before the music starts. */
if( bFirstUpdate )
SOUND->Flush();
EmptyDeleteQueue();