1#ifndef NW_SND_SOUND_ACTOR_H_
2#define NW_SND_SOUND_ACTOR_H_
4#include <nw/snd/snd_SoundStartable.h>
5#include <nw/snd/snd_ExternalSoundPlayer.h>
6#include <nw/snd/snd_BasicSound.h>
8namespace nw {
namespace snd {
41 m_ActorParam.volume = volume;
46 return m_ActorParam.volume;
51 m_ActorParam.pitch = pitch;
56 return m_ActorParam.pitch;
61 m_ActorParam.tvVolume = volume;
66 return m_ActorParam.tvVolume;
71 m_ActorParam.tvPan = pan;
76 return m_ActorParam.tvPan;
82 m_ActorParam.drcVolume[drcIndex] = volume;
88 return m_ActorParam.drcVolume[drcIndex];
94 m_ActorParam.drcPan[drcIndex] = pan;
100 return m_ActorParam.drcPan[drcIndex];
108 template <
class Function>
111 template <
class Function>
112 Function
ForEachSound(Function function,
bool reverse =
false);
116 if (actorPlayerId < 0 || ACTOR_PLAYER_COUNT <= actorPlayerId)
158template <
class Function>
161 for (
int actorPlayerIndex = 0; actorPlayerIndex <
ACTOR_PLAYER_COUNT; actorPlayerIndex++)
162 m_ActorPlayer[actorPlayerIndex].ForEachSoundRef<Function>(function, reverse);
165template <
class Function>
168 for (
int actorPlayerIndex = 0; actorPlayerIndex <
ACTOR_PLAYER_COUNT; actorPlayerIndex++)
169 m_ActorPlayer[actorPlayerIndex].ForEachSound<Function>(function, reverse);
Definition snd_SoundActor.h:13
void SetPlayableSoundCount(int actorPlayerId, int count)
SoundActor(SoundArchivePlayer &soundArchivePlayer)
virtual SoundStartable::StartResult SetupSound(SoundHandle *handle, u32 soundId, const SoundStartable::StartInfo *startInfo, void *setupArg)
f32 GetDrcPan(u32 drcIndex=0) const
Definition snd_SoundActor.h:97
SoundArchivePlayer * m_pSoundArchivePlayer
Definition snd_SoundActor.h:149
virtual SoundStartable::StartResult detail_SetupSoundWithAmbientInfo(SoundHandle *handle, u32 soundId, const SoundStartable::StartInfo *startInfo, internal::BasicSound::AmbientInfo *ambientInfo, void *setupArg)
void Initialize(SoundArchivePlayer &soundArchivePlayer)
Function ForEachSound(Function function, bool reverse=false)
Definition snd_SoundActor.h:166
f32 GetPan() const
Definition snd_SoundActor.h:74
const internal::SoundActorParam & detail_GetActorParam() const
Definition snd_SoundActor.h:122
f32 GetVolume() const
Definition snd_SoundActor.h:44
bool m_IsInitialized
Definition snd_SoundActor.h:153
ActorPlayer * detail_GetActorPlayer(int actorPlayerId)
Definition snd_SoundActor.h:114
void SetDrcOutVolume(f32 volume, u32 drcIndex=0)
Definition snd_SoundActor.h:79
void SetPitch(f32 pitch)
Definition snd_SoundActor.h:49
void SetVolume(f32 volume)
Definition snd_SoundActor.h:39
f32 GetDrcOutVolume(u32 drcIndex=0) const
Definition snd_SoundActor.h:85
ActorPlayer m_ActorPlayer[ACTOR_PLAYER_COUNT]
Definition snd_SoundActor.h:150
SoundStartable::StartResult detail_SetupSound(SoundHandle *handle, u32 soundId, bool holdFlag, const SoundStartable::StartInfo *startInfo) override
void StopAllSound(int fadeFrames)
f32 GetMainOutVolume() const
Definition snd_SoundActor.h:64
f32 GetPitch() const
Definition snd_SoundActor.h:54
SoundArchive::ItemId detail_GetItemId(const char *pString) override
internal::SoundActorParam m_ActorParam
Definition snd_SoundActor.h:151
bool m_IsFinalized
Definition snd_SoundActor.h:154
void SetDrcPan(f32 pan, u32 drcIndex=0)
Definition snd_SoundActor.h:91
void SetPan(f32 pan)
Definition snd_SoundActor.h:69
int GetPlayableSoundCount(int actorPlayerId) const
static const int ACTOR_PLAYER_COUNT
Definition snd_SoundActor.h:17
void PauseAllSound(bool flag, int fadeFrames)
void ForEachSoundRef(Function &function, bool reverse=false)
Definition snd_SoundActor.h:159
internal::ExternalSoundPlayer ActorPlayer
Definition snd_SoundActor.h:14
void SetMainOutVolume(f32 volume)
Definition snd_SoundActor.h:59
int GetPlayingSoundCount(int actorPlayerId) const
Definition snd_SoundArchivePlayer.h:26
Definition snd_SoundArchive.h:11
u32 ItemId
Definition snd_SoundArchive.h:13
Definition snd_SoundHandle.h:10
Definition snd_SoundStartable.h:14
Definition snd_SoundStartable.h:11
Definition snd_BasicSound.h:146
Definition snd_ExternalSoundPlayer.h:14
Definition snd_BasicSound.cpp:3
Definition snd_BasicSound.cpp:3
Definition snd_SoundActor.h:145
bool holdFlag
Definition snd_SoundActor.h:146
Definition snd_SoundStartable.h:70
Definition snd_BasicSound.h:163
Definition snd_BasicSound.h:107