From c3ad1345ef2bdfd4e2056a8df988d1bf9e20b30e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 15 Mar 2005 22:52:01 +0000 Subject: [PATCH] load row sound in advance --- stepmania/src/ScreenMiniMenu.cpp | 6 ++++-- stepmania/src/ScreenMiniMenu.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 6e8dda579c..6c568e4252 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -62,6 +62,8 @@ ScreenMiniMenu::ScreenMiniMenu( const Menu* pDef, ScreenMessage SM_SendOnOK, Scr m_textTitle.SetZoom( 0.8f ); this->AddChild( &m_textTitle ); + m_sndRow.Load( THEME->GetPathS("ScreenMiniMenu","row") ); + bool bMarkedFirstEnabledLine = false; m_iCurLine = 0; @@ -232,7 +234,7 @@ void ScreenMiniMenu::BeforeLineChanged() m_textAnswer[m_iCurLine].SetEffectNone(); m_textLabel[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED ); m_textAnswer[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED ); - SOUND->PlayOnce( THEME->GetPathS("ScreenMiniMenu","row") ); + m_sndRow.Play(); } void ScreenMiniMenu::AfterLineChanged() @@ -245,7 +247,7 @@ void ScreenMiniMenu::AfterLineChanged() void ScreenMiniMenu::AfterAnswerChanged() { - SOUND->PlayOnce( THEME->GetPathS("ScreenMiniMenu","row") ); + m_sndRow.Play(); int iAnswerInRow = m_iCurAnswers[m_iCurLine]; CString sAnswerText = m_Def.rows[m_iCurLine].choices[iAnswerInRow]; m_textAnswer[m_iCurLine].SetText( sAnswerText ); diff --git a/stepmania/src/ScreenMiniMenu.h b/stepmania/src/ScreenMiniMenu.h index eb50bcddca..f242f50604 100644 --- a/stepmania/src/ScreenMiniMenu.h +++ b/stepmania/src/ScreenMiniMenu.h @@ -7,7 +7,7 @@ #include "BitmapText.h" #include "Transition.h" #include "Quad.h" -#include "RandomSample.h" +#include "RageSound.h" #include "BGAnimation.h" #define MAX_MENU_ROWS 40 @@ -94,6 +94,7 @@ protected: int m_iCurLine; int m_iCurAnswers[MAX_MENU_ROWS]; ScreenMessage m_SMSendOnOK, m_SMSendOnCancel; + RageSound m_sndRow; Transition m_In; Transition m_Out;