Pass RageSoundParams to Play() (or SetParams). This should help fix

the long-standing ambiguity of "what happens if parameters are changed
for a second copy of a sound when a first is still playing".
This commit is contained in:
Glenn Maynard
2004-02-28 02:09:46 +00:00
parent 71d1380951
commit be03ed1c21
8 changed files with 96 additions and 121 deletions
+7 -11
View File
@@ -133,19 +133,15 @@ void StartPlayingMusic( const RageTimer &when, const MusicToPlay &ToPlay, MusicP
Playing.m_Music->Load( ToPlay.file, false );
RageSoundParams p;
p.m_StartSecond = ToPlay.start_sec;
p.m_LengthSeconds = ToPlay.length_sec;
p.m_FadeLength = ToPlay.fade_len;
p.StartTime = when;
if( ToPlay.force_loop )
Playing.m_Music->SetStopMode( RageSound::M_LOOP );
p.StopMode = RageSoundParams::M_LOOP;
Playing.m_Music->SetStartSeconds( ToPlay.start_sec );
if( ToPlay.length_sec == -1 )
Playing.m_Music->SetLengthSeconds();
else
Playing.m_Music->SetLengthSeconds( ToPlay.length_sec );
Playing.m_Music->SetFadeLength( ToPlay.fade_len );
Playing.m_Music->SetPositionSeconds();
Playing.m_Music->SetStartTime( when );
Playing.m_Music->SetPositionSeconds( p.m_StartSecond );
Playing.m_Music->StartPlaying();
}