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.
This commit is contained in:
Thai Pangsakulyanont
2011-09-10 12:59:26 +07:00
parent e56de5a09a
commit 0db3fbac7a
+1 -1
View File
@@ -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 )
{