NW4F Snd
Loading...
Searching...
No Matches
nw::snd::SoundActor Class Reference

#include <snd_SoundActor.h>

Inherits nw::snd::SoundStartable.

Classes

struct  SetupInfo

Public Member Functions

 SoundActor (SoundArchivePlayer &soundArchivePlayer)
 SoundActor ()
 ~SoundActor () override
void Initialize (SoundArchivePlayer &soundArchivePlayer)
void Finalize ()
void StopAllSound (int fadeFrames)
void PauseAllSound (bool flag, int fadeFrames)
void SetVolume (f32 volume)
f32 GetVolume () const
void SetPitch (f32 pitch)
f32 GetPitch () const
void SetMainOutVolume (f32 volume)
f32 GetMainOutVolume () const
void SetPan (f32 pan)
f32 GetPan () const
void SetDrcOutVolume (f32 volume, u32 drcIndex=0)
f32 GetDrcOutVolume (u32 drcIndex=0) const
void SetDrcPan (f32 pan, u32 drcIndex=0)
f32 GetDrcPan (u32 drcIndex=0) const
int GetPlayingSoundCount (int actorPlayerId) const
void SetPlayableSoundCount (int actorPlayerId, int count)
int GetPlayableSoundCount (int actorPlayerId) const
template<class Function>
void ForEachSoundRef (Function &function, bool reverse=false)
template<class Function>
Function ForEachSound (Function function, bool reverse=false)
ActorPlayerdetail_GetActorPlayer (int actorPlayerId)
const internal::SoundActorParamdetail_GetActorParam () const
virtual SoundStartable::StartResult detail_SetupSoundWithAmbientInfo (SoundHandle *handle, u32 soundId, const SoundStartable::StartInfo *startInfo, internal::BasicSound::AmbientInfo *ambientInfo, void *setupArg)
Public Member Functions inherited from nw::snd::SoundStartable
virtual ~SoundStartable ()
StartResult StartSound (SoundHandle *pHandle, SoundArchive::ItemId soundId, const StartInfo *pStartInfo=NULL)
StartResult StartSound (SoundHandle *pHandle, const char *pSoundName, const StartInfo *pStartInfo=NULL)
StartResult HoldSound (SoundHandle *pHandle, SoundArchive::ItemId soundId, const StartInfo *pHoldInfo=NULL)
StartResult HoldSound (SoundHandle *pHandle, const char *pSoundName, const StartInfo *pHoldInfo=NULL)
StartResult PrepareSound (SoundHandle *pHandle, SoundArchive::ItemId soundId, const StartInfo *pStartInfo=NULL)
StartResult PrepareSound (SoundHandle *pHandle, const char *pSoundName, const StartInfo *pStartInfo=NULL)

Static Public Attributes

static const int ACTOR_PLAYER_COUNT = 4

Protected Member Functions

virtual SoundStartable::StartResult SetupSound (SoundHandle *handle, u32 soundId, const SoundStartable::StartInfo *startInfo, void *setupArg)

Private Types

typedef internal::ExternalSoundPlayer ActorPlayer

Private Member Functions

SoundStartable::StartResult detail_SetupSound (SoundHandle *handle, u32 soundId, bool holdFlag, const SoundStartable::StartInfo *startInfo) override
SoundArchive::ItemId detail_GetItemId (const char *pString) override

Private Attributes

SoundArchivePlayerm_pSoundArchivePlayer
ActorPlayer m_ActorPlayer [ACTOR_PLAYER_COUNT]
internal::SoundActorParam m_ActorParam
bool m_IsInitialized
bool m_IsFinalized

Member Typedef Documentation

◆ ActorPlayer

Constructor & Destructor Documentation

◆ SoundActor() [1/2]

nw::snd::SoundActor::SoundActor ( SoundArchivePlayer & soundArchivePlayer)

◆ SoundActor() [2/2]

nw::snd::SoundActor::SoundActor ( )

◆ ~SoundActor()

nw::snd::SoundActor::~SoundActor ( )
override

Member Function Documentation

◆ Initialize()

void nw::snd::SoundActor::Initialize ( SoundArchivePlayer & soundArchivePlayer)

◆ Finalize()

void nw::snd::SoundActor::Finalize ( )

◆ StopAllSound()

void nw::snd::SoundActor::StopAllSound ( int fadeFrames)

◆ PauseAllSound()

void nw::snd::SoundActor::PauseAllSound ( bool flag,
int fadeFrames )

◆ SetupSound()

virtual SoundStartable::StartResult nw::snd::SoundActor::SetupSound ( SoundHandle * handle,
u32 soundId,
const SoundStartable::StartInfo * startInfo,
void * setupArg )
protectedvirtual

◆ SetVolume()

void nw::snd::SoundActor::SetVolume ( f32 volume)
inline

◆ GetVolume()

f32 nw::snd::SoundActor::GetVolume ( ) const
inline

◆ SetPitch()

void nw::snd::SoundActor::SetPitch ( f32 pitch)
inline

◆ GetPitch()

f32 nw::snd::SoundActor::GetPitch ( ) const
inline

◆ SetMainOutVolume()

void nw::snd::SoundActor::SetMainOutVolume ( f32 volume)
inline

◆ GetMainOutVolume()

f32 nw::snd::SoundActor::GetMainOutVolume ( ) const
inline

◆ SetPan()

void nw::snd::SoundActor::SetPan ( f32 pan)
inline

◆ GetPan()

f32 nw::snd::SoundActor::GetPan ( ) const
inline

◆ SetDrcOutVolume()

void nw::snd::SoundActor::SetDrcOutVolume ( f32 volume,
u32 drcIndex = 0 )
inline

◆ GetDrcOutVolume()

f32 nw::snd::SoundActor::GetDrcOutVolume ( u32 drcIndex = 0) const
inline

◆ SetDrcPan()

void nw::snd::SoundActor::SetDrcPan ( f32 pan,
u32 drcIndex = 0 )
inline

◆ GetDrcPan()

f32 nw::snd::SoundActor::GetDrcPan ( u32 drcIndex = 0) const
inline

◆ GetPlayingSoundCount()

int nw::snd::SoundActor::GetPlayingSoundCount ( int actorPlayerId) const

◆ SetPlayableSoundCount()

void nw::snd::SoundActor::SetPlayableSoundCount ( int actorPlayerId,
int count )

◆ GetPlayableSoundCount()

int nw::snd::SoundActor::GetPlayableSoundCount ( int actorPlayerId) const

◆ ForEachSoundRef()

template<class Function>
void nw::snd::SoundActor::ForEachSoundRef ( Function & function,
bool reverse = false )
inline

◆ ForEachSound()

template<class Function>
Function nw::snd::SoundActor::ForEachSound ( Function function,
bool reverse = false )
inline

◆ detail_GetActorPlayer()

ActorPlayer * nw::snd::SoundActor::detail_GetActorPlayer ( int actorPlayerId)
inline

◆ detail_GetActorParam()

const internal::SoundActorParam & nw::snd::SoundActor::detail_GetActorParam ( ) const
inline

◆ detail_SetupSoundWithAmbientInfo()

virtual SoundStartable::StartResult nw::snd::SoundActor::detail_SetupSoundWithAmbientInfo ( SoundHandle * handle,
u32 soundId,
const SoundStartable::StartInfo * startInfo,
internal::BasicSound::AmbientInfo * ambientInfo,
void * setupArg )
virtual

◆ detail_SetupSound()

SoundStartable::StartResult nw::snd::SoundActor::detail_SetupSound ( SoundHandle * handle,
u32 soundId,
bool holdFlag,
const SoundStartable::StartInfo * startInfo )
overrideprivatevirtual

◆ detail_GetItemId()

SoundArchive::ItemId nw::snd::SoundActor::detail_GetItemId ( const char * pString)
overrideprivatevirtual

Member Data Documentation

◆ ACTOR_PLAYER_COUNT

const int nw::snd::SoundActor::ACTOR_PLAYER_COUNT = 4
static

◆ m_pSoundArchivePlayer

SoundArchivePlayer* nw::snd::SoundActor::m_pSoundArchivePlayer
private

◆ m_ActorPlayer

ActorPlayer nw::snd::SoundActor::m_ActorPlayer[ACTOR_PLAYER_COUNT]
private

◆ m_ActorParam

internal::SoundActorParam nw::snd::SoundActor::m_ActorParam
private

◆ m_IsInitialized

bool nw::snd::SoundActor::m_IsInitialized
private

◆ m_IsFinalized

bool nw::snd::SoundActor::m_IsFinalized
private