use RSM->PlayMusic for music. This fixes credits and menu music

playing into the attract.
This commit is contained in:
Glenn Maynard
2003-01-19 10:14:46 +00:00
parent 86d71eaf4e
commit 45ee7a9b1d
3 changed files with 8 additions and 8 deletions
+8 -4
View File
@@ -54,8 +54,7 @@ ScreenAttract::ScreenAttract( CString sMetricName, CString sElementName )
m_soundStart.Load( THEME->GetPathTo("Sounds","menu start") );
m_soundMusic.Load( THEME->GetPathTo("Sounds",m_sElementName + " music") );
m_soundMusic.Play();
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds",m_sElementName + " music"), false );
GAMESTATE->m_bPlayersCanJoin = true;
@@ -101,7 +100,7 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type
break;
case MENU_BUTTON_COIN:
Screen::MenuCoin( MenuI.player ); // increment coins, play sound
m_soundMusic.Stop();
SOUNDMAN->music->StopPlaying();
::Sleep( 200 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
@@ -116,7 +115,7 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type
// fall through
case PrefsManager::COIN_FREE:
case PrefsManager::COIN_HOME:
m_soundMusic.Stop();
SOUNDMAN->music->StopPlaying();
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") );
::Sleep( 200 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
@@ -145,6 +144,11 @@ void ScreenAttract::HandleScreenMessage( const ScreenMessage SM )
m_Fade.CloseWipingRight( SM_GoToNextScreen );
break;
case SM_GoToNextScreen:
/* XXX: Look at the def of the screen we're going to; if it has a
* music theme element and it's the same as the one we're playing
* now, don't stop. (However, if we're going to interrupt it
* when we fade in, it's cleaner to stop it before we fade out.) */
SOUNDMAN->PlayMusic( "" );
SCREENMAN->SetNewScreen( NEXT_SCREEN );
break;
}
-2
View File
@@ -40,8 +40,6 @@ protected:
BGAnimation m_Background;
TransitionFade m_Fade;
RandomSample m_soundStart;
RageSound m_soundMusic;
};
-2
View File
@@ -122,8 +122,6 @@ ScreenTitleMenu::ScreenTitleMenu()
for( int i=0; i<NUM_TITLE_MENU_CHOICES; i++ )
LoseFocus( i );
GainFocus( m_TitleMenuChoice );
m_soundMusic.Stop();
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","title menu music") );