split out LoadAutoplaySoundsInto

This commit is contained in:
Glenn Maynard
2006-12-10 04:42:39 +00:00
parent 3859d3b7bc
commit 0eaab20da5
2 changed files with 19 additions and 10 deletions
+16 -10
View File
@@ -29,20 +29,12 @@ void AutoKeysounds::Load( PlayerNumber pn, const NoteData& ndAutoKeysoundsOnly )
m_ndAutoKeysoundsOnly[pn] = ndAutoKeysoundsOnly;
}
void AutoKeysounds::FinishLoading()
void AutoKeysounds::LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain )
{
m_sSound.Unload();
/* Load the BGM. */
RageSoundReader_Chain *pChain = new RageSoundReader_Chain;
Song* pSong = GAMESTATE->m_pCurSong;
pChain->SetPreferredSampleRate( SOUNDMAN->GetDriverSampleRate(44100) );
pChain->AddSound( pChain->LoadSound(pSong->GetMusicPath()), 0, 0 );
//
// Load sounds.
//
Song* pSong = GAMESTATE->m_pCurSong;
RString sSongDir = pSong->GetSongDir();
/*
m_vKeysounds.clear();
@@ -122,7 +114,21 @@ void AutoKeysounds::FinishLoading()
}
}
}
}
void AutoKeysounds::FinishLoading()
{
m_sSound.Unload();
/* Load the BGM. */
RageSoundReader_Chain *pChain = new RageSoundReader_Chain;
Song* pSong = GAMESTATE->m_pCurSong;
pChain->SetPreferredSampleRate( SOUNDMAN->GetDriverSampleRate(44100) );
pChain->AddSound( pChain->LoadSound(pSong->GetMusicPath()), 0, 0 );
LoadAutoplaySoundsInto( pChain );
pChain->Finish();
/* Load a pitch shifter for the whole sound. */