use SoundEffectControl
This commit is contained in:
@@ -110,6 +110,10 @@ public:
|
|||||||
/* Load a RageSoundReader that you've set up yourself. Sample rate conversion will
|
/* Load a RageSoundReader that you've set up yourself. Sample rate conversion will
|
||||||
* be set up only if needed. Doesn't fail. */
|
* be set up only if needed. Doesn't fail. */
|
||||||
void LoadSoundReader( RageSoundReader *pSound );
|
void LoadSoundReader( RageSoundReader *pSound );
|
||||||
|
|
||||||
|
/* Get the loaded RageSoundReader. While playing, only properties can be set. */
|
||||||
|
RageSoundReader *GetSoundReader() { return m_pSource; }
|
||||||
|
|
||||||
void Unload();
|
void Unload();
|
||||||
bool IsLoaded() const;
|
bool IsLoaded() const;
|
||||||
|
|
||||||
|
|||||||
@@ -980,6 +980,17 @@ void ScreenGameplay::SetupSong( int iSongIndex )
|
|||||||
m_AutoKeysounds.Load( pi->GetStepsAndTrailIndex(), nd );
|
m_AutoKeysounds.Load( pi->GetStepsAndTrailIndex(), nd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
RString sType;
|
||||||
|
switch( GAMESTATE->m_SongOptions.GetCurrent().m_SoundEffectType )
|
||||||
|
{
|
||||||
|
case SongOptions::SOUNDEFFECT_OFF: sType = ""; break;
|
||||||
|
case SongOptions::SOUNDEFFECT_SPEED: sType = "SoundEffectControl_Speed"; break;
|
||||||
|
case SongOptions::SOUNDEFFECT_PITCH: sType = "SoundEffectControl_Pitch"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
pi->m_SoundEffectControl.Load( sType, pi->GetPlayerState(), &pi->m_NoteData );
|
||||||
|
}
|
||||||
|
|
||||||
// Put course options into effect. Do this after Player::Load so
|
// Put course options into effect. Do this after Player::Load so
|
||||||
// that mods aren't double-applied.
|
// that mods aren't double-applied.
|
||||||
@@ -1254,6 +1265,12 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
* to compete with other loading. */
|
* to compete with other loading. */
|
||||||
m_AutoKeysounds.FinishLoading();
|
m_AutoKeysounds.FinishLoading();
|
||||||
m_pSoundMusic = m_AutoKeysounds.GetSound();
|
m_pSoundMusic = m_AutoKeysounds.GetSound();
|
||||||
|
|
||||||
|
/* Give SoundEffectControls the new RageSoundReaders. */
|
||||||
|
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||||
|
{
|
||||||
|
pi->m_SoundEffectControl.SetSoundReader( m_pSoundMusic->GetSoundReader() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGameplay::LoadLights()
|
void ScreenGameplay::LoadLights()
|
||||||
@@ -1587,6 +1604,8 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
pi->GetPlayerState()->m_HealthState = PlayerState::ALIVE;
|
pi->GetPlayerState()->m_HealthState = PlayerState::ALIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pi->m_SoundEffectControl.Update( fDeltaTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f )
|
if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f )
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "PlayerStageStats.h"
|
#include "PlayerStageStats.h"
|
||||||
#include "PlayerState.h"
|
#include "PlayerState.h"
|
||||||
#include "InputEventPlus.h"
|
#include "InputEventPlus.h"
|
||||||
|
#include "SoundEffectControl.h"
|
||||||
|
|
||||||
class LyricsLoader;
|
class LyricsLoader;
|
||||||
class ActiveAttackList;
|
class ActiveAttackList;
|
||||||
@@ -67,6 +68,7 @@ public:
|
|||||||
bool m_bIsDummy;
|
bool m_bIsDummy;
|
||||||
PlayerState m_PlayerStateDummy;
|
PlayerState m_PlayerStateDummy;
|
||||||
PlayerStageStats m_PlayerStageStatsDummy;
|
PlayerStageStats m_PlayerStageStatsDummy;
|
||||||
|
SoundEffectControl m_SoundEffectControl;
|
||||||
|
|
||||||
vector<Steps*> m_vpStepsQueue; // size may be >1 if playing a course
|
vector<Steps*> m_vpStepsQueue; // size may be >1 if playing a course
|
||||||
vector<AttackArray> m_asModifiersQueue;// size may be >1 if playing a course
|
vector<AttackArray> m_asModifiersQueue;// size may be >1 if playing a course
|
||||||
|
|||||||
Reference in New Issue
Block a user