diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 899d68a10f..cbfdb7ad1c 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -53,10 +53,6 @@ void ScreenDemonstration::Init() GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR; - /* If needed, turn sound off. */ - if( !GAMESTATE->IsTimeToPlayAttractSounds() ) - SOUNDMAN->SetPrefs( 0 ); // silent - ScreenJukebox::Init(); if( GAMESTATE->m_pCurSong == NULL ) // we didn't find a song. @@ -87,8 +83,6 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) } else if( SM == SM_GainFocus ) { - if( !GAMESTATE->IsTimeToPlayAttractSounds() ) - SOUNDMAN->SetPrefs( 0 ); // silent } else if( SM == SM_LoseFocus ) { diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index fe0598e1d3..0c193c8e03 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1131,6 +1131,9 @@ float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusi p.StopMode = RageSoundParams::M_CONTINUE; p.m_StartSecond = fStartSecond; + // Silence music if not playing attract sounds in demonstration. + p.m_Volume = (!GAMESTATE->m_bDemonstrationOrJukebox || GAMESTATE->IsTimeToPlayAttractSounds()) ? 1 : 0; + ASSERT( !m_pSoundMusic->IsPlaying() ); m_pSoundMusic->Play( &p ); if( m_bPaused ) @@ -2080,7 +2083,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) float fFadeLengthSeconds = MUSIC_FADE_OUT_SECONDS; RageSoundParams p = m_pSoundMusic->GetParams(); p.m_FadeLength = fFadeLengthSeconds; - p.m_LengthSeconds = GAMESTATE->m_fMusicSeconds + fFadeLengthSeconds; + p.m_LengthSeconds = GAMESTATE->m_fMusicSeconds + fFadeLengthSeconds; m_pSoundMusic->SetParams(p); SCREENMAN->PostMessageToTopScreen( SM_StartLoadingNextSong, fFadeLengthSeconds ); return;