add separately controllable fade

This commit is contained in:
Glenn Maynard
2003-02-10 21:43:50 +00:00
parent f6ebc8a30a
commit 76e1f7b8ba
4 changed files with 22 additions and 10 deletions
+3 -2
View File
@@ -242,7 +242,7 @@ void RageSoundManager::MixAudio(Sint16 *dst, const Sint16 *src, Uint32 len, floa
}
}
void RageSoundManager::PlayMusic(CString file, bool loop, float start_sec, float length_sec)
void RageSoundManager::PlayMusic(CString file, bool loop, float start_sec, float length_sec, float fade_len)
{
// LOG->Trace("play '%s' (current '%s')", file.GetString(), music->GetLoadedFilePath().GetString());
if(music->IsPlaying())
@@ -270,7 +270,8 @@ void RageSoundManager::PlayMusic(CString file, bool loop, float start_sec, float
music->SetLengthSeconds();
else
music->SetLengthSeconds(length_sec);
music->SetFadeLength(fade_len);
music->SetPositionSeconds();
music->StartPlaying();
}