MusicBannerWheel Comparison Fixes
This commit is contained in:
@@ -334,9 +334,14 @@ void MusicBannerWheel::PlayMusicSample()
|
|||||||
Song* pSong = GetSelectedSong();
|
Song* pSong = GetSelectedSong();
|
||||||
if( pSong && pSong->HasMusic() )
|
if( pSong && pSong->HasMusic() )
|
||||||
{
|
{
|
||||||
SOUND->PlayMusic(pSong->GetMusicPath(), true,
|
if(SOUND->GetMusicPath().CompareNoCase(pSong->GetMusicPath())) // dont play the same sound over and over
|
||||||
pSong->m_fMusicSampleStartSeconds,
|
{
|
||||||
pSong->m_fMusicSampleLengthSeconds);
|
|
||||||
|
SOUND->StopMusic();
|
||||||
|
SOUND->PlayMusic(pSong->GetMusicPath(), true,
|
||||||
|
pSong->m_fMusicSampleStartSeconds,
|
||||||
|
pSong->m_fMusicSampleLengthSeconds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ CString RageSounds::GetMusicPath() const
|
|||||||
void RageSounds::PlayMusic(CString file, bool force_loop, float start_sec, float length_sec, float fade_len)
|
void RageSounds::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());
|
// LOG->Trace("play '%s' (current '%s')", file.c_str(), music->GetLoadedFilePath().c_str());
|
||||||
|
CString loaded = music->GetLoadedFilePath();
|
||||||
|
|
||||||
if(music->IsPlaying())
|
if(music->IsPlaying())
|
||||||
{
|
{
|
||||||
if( !music->GetLoadedFilePath().CompareNoCase(file) )
|
if( !music->GetLoadedFilePath().CompareNoCase(file) )
|
||||||
|
|||||||
Reference in New Issue
Block a user