From 9840777aba955fe13a95770ff3e5d88ef59bebce Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 4 Mar 2003 01:13:36 +0000 Subject: [PATCH] fix sounds playing twice --- stepmania/src/ScreenSelectMaxType2.cpp | 27 +++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/stepmania/src/ScreenSelectMaxType2.cpp b/stepmania/src/ScreenSelectMaxType2.cpp index 3374782d16..6bdf9cbc72 100644 --- a/stepmania/src/ScreenSelectMaxType2.cpp +++ b/stepmania/src/ScreenSelectMaxType2.cpp @@ -242,6 +242,8 @@ void ScreenSelectMaxType2::ChangePage( Page newPage ) for( p=0; pPlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("ScreenSelectMaxType2 comment %s",mc.name)) ); + /* Don't play sound if we're on the second page and another player + * has already selected, since it just played. */ + bool AnotherPlayerSelected = false; + int p; + for( p=0; pPlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("ScreenSelectMaxType2 comment %s",mc.name)) ); + m_soundSelect.Play(); + } - /* XXX: This will play the same announcer twice at the same time; that'll probably - * result in an echo effect. */ if( m_CurrentPage == PAGE_2 ) { // choose this for all the other players too - for( int p=0; p