From cc0362bfa272bc4a7a418c72fe60f4222d7995dc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 26 Jul 2003 22:18:32 +0000 Subject: [PATCH] stub music calls until converted --- stepmania/src/RageSoundManager.cpp | 47 +++++++----------------------- stepmania/src/RageSoundManager.h | 3 +- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/stepmania/src/RageSoundManager.cpp b/stepmania/src/RageSoundManager.cpp index f828b1f759..c51125412e 100644 --- a/stepmania/src/RageSoundManager.cpp +++ b/stepmania/src/RageSoundManager.cpp @@ -10,6 +10,8 @@ #include "RageLog.h" #include "RageTimer.h" +#include "RageMusic.h" + #include "arch/arch.h" #include "arch/Sound/RageSoundDriver.h" #include "SDL_audio.h" @@ -255,46 +257,19 @@ void RageSoundManager::MixAudio(Sint16 *dst, const Sint16 *src, Uint32 len, floa } } -CString RageSoundManager::GetMusicPath() const -{ - return music->GetLoadedFilePath(); -} void RageSoundManager::PlayMusic(CString file, bool force_loop, float start_sec, float length_sec, float fade_len) { -// LOG->Trace("play '%s' (current '%s')", file.c_str(), music->GetLoadedFilePath().c_str()); - if(music->IsPlaying()) - { - if( music->GetLoadedFilePath() == file ) - return; // do nothing + MUSIC->Play(file, force_loop, start_sec, length_sec, fade_len); +} +void RageSoundManager::StopMusic() +{ + MUSIC->Stop(); +} - music->StopPlaying(); - } - - /* If file is blank, just stop. */ - if(file.empty()) - { - music->Unload(); - return; - } - - music->Load( file, false ); - if( force_loop ) - music->SetStopMode( RageSound::M_LOOP ); - - if(start_sec == -1) - music->SetStartSeconds(); - else - music->SetStartSeconds(start_sec); - - if(length_sec == -1) - music->SetLengthSeconds(); - else - music->SetLengthSeconds(length_sec); - - music->SetFadeLength(fade_len); - music->SetPositionSeconds(); - music->StartPlaying(); +CString RageSoundManager::GetMusicPath() const +{ + return MUSIC->GetPath(); } void RageSoundManager::SetPrefs(float MixVol) diff --git a/stepmania/src/RageSoundManager.h b/stepmania/src/RageSoundManager.h index d564161f1e..ce6287bba4 100644 --- a/stepmania/src/RageSoundManager.h +++ b/stepmania/src/RageSoundManager.h @@ -60,8 +60,9 @@ public: * itself to this. */ set all_sounds; + /* stubs for music */ void PlayMusic(CString file, bool force_loop = false, float start_sec = -1, float length_sec = -1, float fade_len = 0); - void StopMusic() { PlayMusic(""); } + void StopMusic(); CString GetMusicPath() const; static void MixAudio(Sint16 *dst, const Sint16 *src, Uint32 len, float volume);