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