split out LoadAutoplaySoundsInto
This commit is contained in:
@@ -29,20 +29,12 @@ void AutoKeysounds::Load( PlayerNumber pn, const NoteData& ndAutoKeysoundsOnly )
|
|||||||
m_ndAutoKeysoundsOnly[pn] = 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.
|
// Load sounds.
|
||||||
//
|
//
|
||||||
|
Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
RString sSongDir = pSong->GetSongDir();
|
RString sSongDir = pSong->GetSongDir();
|
||||||
/*
|
/*
|
||||||
m_vKeysounds.clear();
|
m_vKeysounds.clear();
|
||||||
@@ -122,6 +114,20 @@ 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();
|
pChain->Finish();
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "PlayerNumber.h"
|
#include "PlayerNumber.h"
|
||||||
#include "RageSound.h"
|
#include "RageSound.h"
|
||||||
|
|
||||||
|
class RageSoundReader_Chain;
|
||||||
class AutoKeysounds
|
class AutoKeysounds
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -16,6 +17,8 @@ public:
|
|||||||
RageSound *GetSound() { return &m_sSound; }
|
RageSound *GetSound() { return &m_sSound; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain );
|
||||||
|
|
||||||
NoteData m_ndAutoKeysoundsOnly[NUM_PLAYERS];
|
NoteData m_ndAutoKeysoundsOnly[NUM_PLAYERS];
|
||||||
vector<RageSound> m_vKeysounds;
|
vector<RageSound> m_vKeysounds;
|
||||||
RageSound m_sSound;
|
RageSound m_sSound;
|
||||||
|
|||||||
Reference in New Issue
Block a user