remove unused PlayMusic overload

This commit is contained in:
Chris Danford
2005-07-22 22:17:34 +00:00
parent e2be6fba66
commit 1cfda9a901
5 changed files with 34 additions and 35 deletions
+12 -27
View File
@@ -533,37 +533,19 @@ CString GameSoundManager::GetMusicPath() const
return g_Playing->m_Music->GetLoadedFilePath();
}
/* This function should not touch the disk at all. */
void GameSoundManager::PlayMusic( const CString &file, const CString &timing_file, bool force_loop, float start_sec, float length_sec, float fade_len, bool align_beat )
void GameSoundManager::PlayMusic(
const CString &file,
const TimingData *pTiming,
bool force_loop,
float start_sec,
float length_sec,
float fade_len,
bool align_beat )
{
// LOG->Trace("play '%s' (current '%s')", file.c_str(), g_Playing->m_Music->GetLoadedFilePath().c_str());
// LOG->Trace("play '%s' (current '%s')", file.c_str(), g_Playing->m_Music->GetLoadedFilePath().c_str());
MusicToPlay ToPlay;
ToPlay.file = file;
ToPlay.force_loop = force_loop;
ToPlay.start_sec = start_sec;
ToPlay.length_sec = length_sec;
ToPlay.fade_len = fade_len;
ToPlay.timing_file = timing_file;
ToPlay.align_beat = align_beat;
/* If no timing file was specified, look for one in the same place as the music file. */
if( ToPlay.timing_file == "" && file != "" )
ToPlay.timing_file = SetExtension( file, "sm" );
/* Add the MusicToPlay to the g_MusicsToPlay queue. */
g_Mutex->Lock();
g_MusicsToPlay.push_back( ToPlay );
g_Mutex->Broadcast();
g_Mutex->Unlock();
}
void GameSoundManager::PlayMusic( const CString &file, const TimingData *pTiming, bool force_loop, float start_sec, float length_sec, float fade_len, bool align_beat )
{
MusicToPlay ToPlay;
ToPlay.file = file;
if( pTiming )
{
@@ -571,7 +553,10 @@ void GameSoundManager::PlayMusic( const CString &file, const TimingData *pTiming
ToPlay.timing_data = *pTiming;
}
else
{
/* If no timing file was specified, look for one in the same place as the music file. */
ToPlay.timing_file = SetExtension( file, "sm" );
}
ToPlay.force_loop = force_loop;
ToPlay.start_sec = start_sec;
+8 -3
View File
@@ -17,9 +17,14 @@ public:
~GameSoundManager();
void Update( float fDeltaTime );
void PlayMusic( const CString &file, bool force_loop = false, float start_sec = 0, float length_sec = -1, float fade_len = 0, bool align_beat = true ) { PlayMusic( file, "", force_loop, start_sec, length_sec, fade_len, align_beat ); }
void PlayMusic( const CString &file, const CString &timing_file, bool force_loop = false, float start_sec = 0, float length_sec = -1, float fade_len = 0, bool align_beat = true );
void PlayMusic( const CString &file, const TimingData *pTiming, bool force_loop = false, float start_sec = 0, float length_sec = -1, float fade_len = 0, bool align_beat = true );
void PlayMusic(
const CString &file,
const TimingData *pTiming = NULL,
bool force_loop = false,
float start_sec = 0,
float length_sec = -1,
float fade_len = 0,
bool align_beat = true );
void StopMusic() { PlayMusic(""); }
void DimMusic( float fVolume, float fDurationSeconds );
CString GetMusicPath() const;
+5 -2
View File
@@ -358,9 +358,12 @@ void MusicBannerWheel::PlayMusicSample()
{
SOUND->StopMusic();
SOUND->PlayMusic(pSong->GetMusicPath(), true,
SOUND->PlayMusic(
pSong->GetMusicPath(),
NULL,
true,
pSong->m_fMusicSampleStartSeconds,
pSong->m_fMusicSampleLengthSeconds);
pSong->m_fMusicSampleLengthSeconds );
}
}
}
+4 -1
View File
@@ -751,7 +751,10 @@ void ScreenEdit::PlayTicks()
void ScreenEdit::PlayPreviewMusic()
{
SOUND->PlayMusic("");
SOUND->PlayMusic( m_pSong->GetMusicPath(), false,
SOUND->PlayMusic(
m_pSong->GetMusicPath(),
NULL,
false,
m_pSong->m_fMusicSampleStartSeconds,
m_pSong->m_fMusicSampleLengthSeconds,
1.5f );
+5 -2
View File
@@ -557,9 +557,12 @@ void ScreenNetSelectMusic::MusicChanged()
{
SOUND->StopMusic();
SOUND->PlayMusic(GAMESTATE->m_pCurSong->GetMusicPath(), true,
SOUND->PlayMusic(
GAMESTATE->m_pCurSong->GetMusicPath(),
NULL,
true,
GAMESTATE->m_pCurSong->m_fMusicSampleStartSeconds,
GAMESTATE->m_pCurSong->m_fMusicSampleLengthSeconds);
GAMESTATE->m_pCurSong->m_fMusicSampleLengthSeconds );
}
}
}