use new sound code directly
This commit is contained in:
@@ -463,9 +463,8 @@ ScreenGameplay::ScreenGameplay()
|
|||||||
* include options set by the course. Should it? -glenn */
|
* include options set by the course. Should it? -glenn */
|
||||||
LoadNextSong( true );
|
LoadNextSong( true );
|
||||||
|
|
||||||
|
|
||||||
/* Keep the music playing after it's finished; we'll stop it. */
|
/* 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 )
|
if( GAMESTATE->m_bDemonstration )
|
||||||
{
|
{
|
||||||
@@ -604,7 +603,7 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
|
|||||||
m_Background.BeginTweening( 2 );
|
m_Background.BeginTweening( 2 );
|
||||||
m_Background.SetTweenDiffuse( RageColor(1,1,1,1) );
|
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 fFirstBeat = GAMESTATE->m_pCurSong->m_fFirstBeat;
|
||||||
const float fFirstSecond = GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat( fFirstBeat );
|
const float fFirstSecond = GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat( fFirstBeat );
|
||||||
const float fStartSecond = min( 0, fFirstSecond-4 );
|
const float fStartSecond = min( 0, fFirstSecond-4 );
|
||||||
@@ -701,14 +700,9 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
int pn;
|
int pn;
|
||||||
|
|
||||||
//LOG->Trace( "ScreenGameplay::Update(%f)", fDeltaTime );
|
|
||||||
|
|
||||||
m_soundMusic.Update( fDeltaTime );
|
|
||||||
|
|
||||||
if( GAMESTATE->m_pCurSong == NULL )
|
if( GAMESTATE->m_pCurSong == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
// update the global music statistics for other classes to access
|
// update the global music statistics for other classes to access
|
||||||
float fPositionSeconds = m_soundMusic.GetPositionSeconds();
|
float fPositionSeconds = m_soundMusic.GetPositionSeconds();
|
||||||
float fSongBeat, fBPS;
|
float fSongBeat, fBPS;
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ private:
|
|||||||
RageSoundSample m_soundToasty;
|
RageSoundSample m_soundToasty;
|
||||||
|
|
||||||
|
|
||||||
RageSoundStream m_soundMusic;
|
RageSound m_soundMusic;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user