split out LoadAutoplaySoundsInto
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "PlayerNumber.h"
|
||||
#include "RageSound.h"
|
||||
|
||||
class RageSoundReader_Chain;
|
||||
class AutoKeysounds
|
||||
{
|
||||
public:
|
||||
@@ -16,6 +17,8 @@ public:
|
||||
RageSound *GetSound() { return &m_sSound; }
|
||||
|
||||
protected:
|
||||
void LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain );
|
||||
|
||||
NoteData m_ndAutoKeysoundsOnly[NUM_PLAYERS];
|
||||
vector<RageSound> m_vKeysounds;
|
||||
RageSound m_sSound;
|
||||
|
||||
Reference in New Issue
Block a user