From 8960227799a66f618c4d7f0bc8fb18ae72d892aa Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 8 Jan 2005 16:59:59 +0000 Subject: [PATCH] fix start sound being cut short --- stepmania/src/ScreenSelectMaster.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScreenSelectMaster.cpp b/stepmania/src/ScreenSelectMaster.cpp index 0845db2da3..c450226d7f 100644 --- a/stepmania/src/ScreenSelectMaster.cpp +++ b/stepmania/src/ScreenSelectMaster.cpp @@ -12,6 +12,7 @@ #include "RageLog.h" #include #include "Foreach.h" +#include "RageSoundManager.h" #define NUM_ICON_PARTS THEME->GetMetricI(m_sName,"NumIconParts") #define NUM_PREVIEW_PARTS THEME->GetMetricI(m_sName,"NumPreviewParts") @@ -596,8 +597,9 @@ void ScreenSelectMaster::MenuStart( PlayerNumber pn ) GameCommand &mc = m_aGameCommands[m_iChoice[pn]]; SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("%s comment %s",m_sName.c_str(), mc.m_sName.c_str())) ); + /* Play a copy of the sound, so it'll finish playing even if we leave the screen immediately. */ if( mc.m_sSoundPath.empty() ) - m_soundStart.Play(); + SOUNDMAN->PlayCopyOfSound( m_soundStart ); if( mc.m_sScreen.empty() ) {