stub music calls until converted

This commit is contained in:
Glenn Maynard
2003-07-26 22:18:32 +00:00
parent 977683dba9
commit cc0362bfa2
2 changed files with 13 additions and 37 deletions
+11 -36
View File
@@ -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)
+2 -1
View File
@@ -60,8 +60,9 @@ public:
* itself to this. */
set<RageSound *> 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);