From 0db3fbac7a6ae7a7b6fe5b24a5c3a09648cb67a4 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Sat, 10 Sep 2011 12:59:26 +0700 Subject: [PATCH] force autokeysound chain to be the shared sound when there's no music. this prevents the crash caused by the asserion "No keysounds were loaded for the song %s!". the song will load just fine in this case, but the notes will not scroll. this only takes place when m_pSharedSound is NULL, which doesn't break when there's background music but no autokeysounds. on a related note, the "notes don't scroll" problem also existed [before this commit] when there's no more autokeysounds to play, in this case, the song stopped and the notes stopped scrolling. and there's no way to get to the end of the song. can't figure out how to deal with this yet. --- src/AutoKeysounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AutoKeysounds.cpp b/src/AutoKeysounds.cpp index b536a3aa95..83535b2053 100644 --- a/src/AutoKeysounds.cpp +++ b/src/AutoKeysounds.cpp @@ -263,7 +263,7 @@ void AutoKeysounds::FinishLoading() pChain->SetPreferredSampleRate( SOUNDMAN->GetDriverSampleRate() ); LoadAutoplaySoundsInto( pChain ); - if( pChain->GetNumSounds() > 0 ) + if( pChain->GetNumSounds() > 0 || !m_pSharedSound ) { if( m_pSharedSound ) {