From 0aa38641eedd09ab6951863b39eb199cac847f59 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 27 Dec 2002 23:16:16 +0000 Subject: [PATCH] use new sound code directly --- stepmania/src/ScreenGameplay.cpp | 10 ++-------- stepmania/src/ScreenGameplay.h | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 5c228032ec..b254b671b6 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -463,9 +463,8 @@ ScreenGameplay::ScreenGameplay() * include options set by the course. Should it? -glenn */ LoadNextSong( true ); - /* Keep the music playing after it's finished; we'll stop it. */ - // XXX m_soundMusic.SetAutoStop(false); + m_soundMusic.SetStopMode(RageSound::M_CONTINUE); if( GAMESTATE->m_bDemonstration ) { @@ -604,7 +603,7 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad ) m_Background.BeginTweening( 2 ); m_Background.SetTweenDiffuse( RageColor(1,1,1,1) ); - m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath(), true ); // enable accurate sync + m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath() ); const float fFirstBeat = GAMESTATE->m_pCurSong->m_fFirstBeat; const float fFirstSecond = GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat( fFirstBeat ); const float fStartSecond = min( 0, fFirstSecond-4 ); @@ -701,14 +700,9 @@ void ScreenGameplay::Update( float fDeltaTime ) { int pn; - //LOG->Trace( "ScreenGameplay::Update(%f)", fDeltaTime ); - - m_soundMusic.Update( fDeltaTime ); - if( GAMESTATE->m_pCurSong == NULL ) return; - // update the global music statistics for other classes to access float fPositionSeconds = m_soundMusic.GetPositionSeconds(); float fSongBeat, fBPS; diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index fdbd4876d0..d91fd97f9a 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -154,7 +154,7 @@ private: RageSoundSample m_soundToasty; - RageSoundStream m_soundMusic; + RageSound m_soundMusic; };