NW4F Snd
Loading...
Searching...
No Matches
nw::snd::internal::BasicSound Class Referenceabstract

#include <snd_BasicSound.h>

Inherited by nw::snd::internal::SequenceSound, nw::snd::internal::StreamSound, and nw::snd::internal::WaveSound.

Classes

class  AmbientArgAllocatorCallback
class  AmbientArgUpdateCallback
struct  AmbientInfo
class  AmbientParamUpdateCallback
struct  CommonParam

Public Types

enum  PlayerState { PLAYER_STATE_INIT , PLAYER_STATE_PLAY , PLAYER_STATE_STOP }
enum  PauseState { PAUSE_STATE_NORMAL , PAUSE_STATE_PAUSING , PAUSE_STATE_PAUSED , PAUSE_STATE_UNPAUSING }

Public Member Functions

 BasicSound ()
virtual ~BasicSound ()
void Update ()
void StartPrepared ()
void Stop (int fadeFrames)
void Pause (bool flag, int fadeFrames)
void SetAutoStopCounter (int frames)
void FadeIn (int frames)
virtual void Initialize ()
virtual void Finalize ()
virtual bool IsPrepared () const =0
bool IsPause () const
bool IsStarted () const
void SetPriority (int priority, int ambientPriority)
void GetPriority (int *priority, int *ambientPriority) const
void SetInitialVolume (f32 volume)
f32 GetInitialVolume () const
void SetVolume (f32 volume, int frames=0)
f32 GetVolume () const
void SetPitch (f32 pitch)
f32 GetPitch () const
void SetOutputLine (u32 lineFlag)
u32 GetOutputLine () const
void ResetOutputLine ()
void SetPan (f32 pan)
f32 GetPan () const
void SetPanMode (PanMode mode)
void SetPanCurve (PanCurve curve)
void SetFrontBypass (bool isFrontBypass)
void SetRemoteFilter (u8 filter)
void SetVoiceRendererType (VoiceRendererType mode)
void SetOutputVolume (OutputDevice device, f32 volume)
f32 GetOutputVolume (OutputDevice device) const
void SetRemoteOutVolume (u32 remoteIndex, f32 volume)
f32 GetRemoteOutVolume (u32 remoteIndex) const
int GetPlayerPriority () const
void SetId (u32 id)
u32 GetId () const
int CalcCurrentPlayerPriority () const
SoundPlayer * GetSoundPlayer ()
const SoundPlayer * GetSoundPlayer () const
void AttachSoundPlayer (SoundPlayer *player)
void DetachSoundPlayer (SoundPlayer *player)
void AttachSoundActor (SoundActor *actor)
void DetachSoundActor (SoundActor *actor)
void AttachExternalSoundPlayer (ExternalSoundPlayer *extPlayer)
void DetachExternalSoundPlayer (ExternalSoundPlayer *extPlayer)
void AttachPlayerHeap (PlayerHeap *pHeap)
void DetachPlayerHeap (PlayerHeap *pHeap)
PlayerHeap * GetPlayerHeap ()
void SetAmbientInfo (const AmbientInfo &info)
void ClearAmbientArgUpdateCallback ()
void ClearAmbientParamUpdateCallback ()
void ClearAmbientArgAllocatorCallback ()
const SoundParamGetAmbientParam () const
bool IsAttachedGeneralHandle ()
bool IsAttachedTempGeneralHandle ()
virtual bool IsAttachedTempSpecialHandle ()=0
void DetachGeneralHandle ()
void DetachTempGeneralHandle ()
virtual void DetachTempSpecialHandle ()=0
void SetUserParamBuffer (void *buffer, size_t size)
void * GetUserParam ()
PauseState GetPauseState () const

Static Public Member Functions

static int GetAmbientPriority (const AmbientInfo &ambientInfo, u32 soundId)

Public Attributes

ut::LinkListNode m_PriorityLink
ut::LinkListNode m_SoundPlayerPlayLink
ut::LinkListNode m_SoundPlayerPriorityLink
ut::LinkListNode m_ExtSoundPlayerPlayLink

Static Public Attributes

static const int PRIORITY_MIN = 0
static const int PRIORITY_MAX = 127
static const u32 INVALID_ID = 0xffffffff

Protected Member Functions

virtual driver::BasicSoundPlayer * GetBasicSoundPlayerHandle ()=0
virtual void OnUpdatePlayerPriority ()
virtual void OnUpdate ()
virtual void UpdateMoveValue ()
virtual void UpdateParam ()
bool IsPlayerAvailable () const

Private Member Functions

void ClearIsFinalizedForCannotAllocatedResourceFlag ()
void ApplyCommonParam (OutputParam &param)

Private Attributes

PlayerHeap * m_pPlayerHeap
SoundHandlem_pGeneralHandle
SoundHandlem_pTempGeneralHandle
SoundPlayer * m_pSoundPlayer
SoundActorm_pSoundActor
ExternalSoundPlayerm_pExtSoundPlayer
AmbientInfo m_AmbientInfo
SoundParam m_AmbientParam
SoundActorParam m_ActorParam
MoveValue< f32, int > m_FadeVolume
MoveValue< f32, int > m_PauseFadeVolume
bool m_InitializeFlag
bool m_StartFlag
bool m_StartedFlag
bool m_AutoStopFlag
bool m_FadeOutFlag
bool m_PlayerAvailableFlag
bool m_UnPauseFlag
PlayerState m_PlayerState
PauseState m_PauseState
s32 m_AutoStopCounter
u32 m_UpdateCounter
u8 m_Priority
s8 m_BiquadFilterType
u32 m_Id
f32 m_InitVolume
f32 m_Pitch
f32 m_LpfFreq
f32 m_BiquadFilterValue
u32 m_OutputLineFlag
u32 _e8
CommonParam m_CommonParam
OutputParam m_OutputParam [OUTPUT_DEVICE_COUNT]
RemoteOutputParam m_RemoteParam [REMOTE_OUT_COUNT]
void * m_pUserParam
size_t m_UserParamSize

Friends

class nw::snd::SoundHandle

Member Enumeration Documentation

◆ PlayerState

Enumerator
PLAYER_STATE_INIT 
PLAYER_STATE_PLAY 
PLAYER_STATE_STOP 

◆ PauseState

Enumerator
PAUSE_STATE_NORMAL 
PAUSE_STATE_PAUSING 
PAUSE_STATE_PAUSED 
PAUSE_STATE_UNPAUSING 

Constructor & Destructor Documentation

◆ BasicSound()

nw::snd::internal::BasicSound::BasicSound ( )

◆ ~BasicSound()

virtual nw::snd::internal::BasicSound::~BasicSound ( )
inlinevirtual

Member Function Documentation

◆ Update()

void nw::snd::internal::BasicSound::Update ( )

◆ StartPrepared()

void nw::snd::internal::BasicSound::StartPrepared ( )

◆ Stop()

void nw::snd::internal::BasicSound::Stop ( int fadeFrames)

◆ Pause()

void nw::snd::internal::BasicSound::Pause ( bool flag,
int fadeFrames )

◆ SetAutoStopCounter()

void nw::snd::internal::BasicSound::SetAutoStopCounter ( int frames)

◆ FadeIn()

void nw::snd::internal::BasicSound::FadeIn ( int frames)

◆ Initialize()

virtual void nw::snd::internal::BasicSound::Initialize ( )
virtual

◆ Finalize()

virtual void nw::snd::internal::BasicSound::Finalize ( )
virtual

◆ IsPrepared()

virtual bool nw::snd::internal::BasicSound::IsPrepared ( ) const
pure virtual

◆ IsPause()

bool nw::snd::internal::BasicSound::IsPause ( ) const

◆ IsStarted()

bool nw::snd::internal::BasicSound::IsStarted ( ) const
inline

◆ SetPriority()

void nw::snd::internal::BasicSound::SetPriority ( int priority,
int ambientPriority )

◆ GetPriority()

void nw::snd::internal::BasicSound::GetPriority ( int * priority,
int * ambientPriority ) const

◆ SetInitialVolume()

void nw::snd::internal::BasicSound::SetInitialVolume ( f32 volume)

◆ GetInitialVolume()

f32 nw::snd::internal::BasicSound::GetInitialVolume ( ) const

◆ SetVolume()

void nw::snd::internal::BasicSound::SetVolume ( f32 volume,
int frames = 0 )

◆ GetVolume()

f32 nw::snd::internal::BasicSound::GetVolume ( ) const

◆ SetPitch()

void nw::snd::internal::BasicSound::SetPitch ( f32 pitch)

◆ GetPitch()

f32 nw::snd::internal::BasicSound::GetPitch ( ) const

◆ SetOutputLine()

void nw::snd::internal::BasicSound::SetOutputLine ( u32 lineFlag)

◆ GetOutputLine()

u32 nw::snd::internal::BasicSound::GetOutputLine ( ) const

◆ ResetOutputLine()

void nw::snd::internal::BasicSound::ResetOutputLine ( )

◆ SetPan()

void nw::snd::internal::BasicSound::SetPan ( f32 pan)

◆ GetPan()

f32 nw::snd::internal::BasicSound::GetPan ( ) const

◆ SetPanMode()

void nw::snd::internal::BasicSound::SetPanMode ( PanMode mode)

◆ SetPanCurve()

void nw::snd::internal::BasicSound::SetPanCurve ( PanCurve curve)

◆ SetFrontBypass()

void nw::snd::internal::BasicSound::SetFrontBypass ( bool isFrontBypass)

◆ SetRemoteFilter()

void nw::snd::internal::BasicSound::SetRemoteFilter ( u8 filter)

◆ SetVoiceRendererType()

void nw::snd::internal::BasicSound::SetVoiceRendererType ( VoiceRendererType mode)

◆ SetOutputVolume()

void nw::snd::internal::BasicSound::SetOutputVolume ( OutputDevice device,
f32 volume )

◆ GetOutputVolume()

f32 nw::snd::internal::BasicSound::GetOutputVolume ( OutputDevice device) const

◆ SetRemoteOutVolume()

void nw::snd::internal::BasicSound::SetRemoteOutVolume ( u32 remoteIndex,
f32 volume )

◆ GetRemoteOutVolume()

f32 nw::snd::internal::BasicSound::GetRemoteOutVolume ( u32 remoteIndex) const

◆ GetPlayerPriority()

int nw::snd::internal::BasicSound::GetPlayerPriority ( ) const
inline

◆ SetId()

void nw::snd::internal::BasicSound::SetId ( u32 id)

◆ GetId()

u32 nw::snd::internal::BasicSound::GetId ( ) const
inline

◆ CalcCurrentPlayerPriority()

int nw::snd::internal::BasicSound::CalcCurrentPlayerPriority ( ) const
inline

◆ GetSoundPlayer() [1/2]

SoundPlayer * nw::snd::internal::BasicSound::GetSoundPlayer ( )
inline

◆ GetSoundPlayer() [2/2]

const SoundPlayer * nw::snd::internal::BasicSound::GetSoundPlayer ( ) const
inline

◆ AttachSoundPlayer()

void nw::snd::internal::BasicSound::AttachSoundPlayer ( SoundPlayer * player)

◆ DetachSoundPlayer()

void nw::snd::internal::BasicSound::DetachSoundPlayer ( SoundPlayer * player)

◆ AttachSoundActor()

void nw::snd::internal::BasicSound::AttachSoundActor ( SoundActor * actor)

◆ DetachSoundActor()

void nw::snd::internal::BasicSound::DetachSoundActor ( SoundActor * actor)

◆ AttachExternalSoundPlayer()

void nw::snd::internal::BasicSound::AttachExternalSoundPlayer ( ExternalSoundPlayer * extPlayer)

◆ DetachExternalSoundPlayer()

void nw::snd::internal::BasicSound::DetachExternalSoundPlayer ( ExternalSoundPlayer * extPlayer)

◆ AttachPlayerHeap()

void nw::snd::internal::BasicSound::AttachPlayerHeap ( PlayerHeap * pHeap)

◆ DetachPlayerHeap()

void nw::snd::internal::BasicSound::DetachPlayerHeap ( PlayerHeap * pHeap)

◆ GetPlayerHeap()

PlayerHeap * nw::snd::internal::BasicSound::GetPlayerHeap ( )
inline

◆ SetAmbientInfo()

void nw::snd::internal::BasicSound::SetAmbientInfo ( const AmbientInfo & info)

◆ ClearAmbientArgUpdateCallback()

void nw::snd::internal::BasicSound::ClearAmbientArgUpdateCallback ( )
inline

◆ ClearAmbientParamUpdateCallback()

void nw::snd::internal::BasicSound::ClearAmbientParamUpdateCallback ( )
inline

◆ ClearAmbientArgAllocatorCallback()

void nw::snd::internal::BasicSound::ClearAmbientArgAllocatorCallback ( )
inline

◆ GetAmbientParam()

const SoundParam & nw::snd::internal::BasicSound::GetAmbientParam ( ) const
inline

◆ GetAmbientPriority()

int nw::snd::internal::BasicSound::GetAmbientPriority ( const AmbientInfo & ambientInfo,
u32 soundId )
static

◆ IsAttachedGeneralHandle()

bool nw::snd::internal::BasicSound::IsAttachedGeneralHandle ( )

◆ IsAttachedTempGeneralHandle()

bool nw::snd::internal::BasicSound::IsAttachedTempGeneralHandle ( )

◆ IsAttachedTempSpecialHandle()

virtual bool nw::snd::internal::BasicSound::IsAttachedTempSpecialHandle ( )
pure virtual

◆ DetachGeneralHandle()

void nw::snd::internal::BasicSound::DetachGeneralHandle ( )

◆ DetachTempGeneralHandle()

void nw::snd::internal::BasicSound::DetachTempGeneralHandle ( )

◆ DetachTempSpecialHandle()

virtual void nw::snd::internal::BasicSound::DetachTempSpecialHandle ( )
pure virtual

◆ SetUserParamBuffer()

void nw::snd::internal::BasicSound::SetUserParamBuffer ( void * buffer,
size_t size )
inline

◆ GetUserParam()

void * nw::snd::internal::BasicSound::GetUserParam ( )
inline

◆ GetPauseState()

PauseState nw::snd::internal::BasicSound::GetPauseState ( ) const
inline

◆ GetBasicSoundPlayerHandle()

virtual driver::BasicSoundPlayer * nw::snd::internal::BasicSound::GetBasicSoundPlayerHandle ( )
protectedpure virtual

◆ OnUpdatePlayerPriority()

virtual void nw::snd::internal::BasicSound::OnUpdatePlayerPriority ( )
inlineprotectedvirtual

◆ OnUpdate()

virtual void nw::snd::internal::BasicSound::OnUpdate ( )
inlineprotectedvirtual

◆ UpdateMoveValue()

virtual void nw::snd::internal::BasicSound::UpdateMoveValue ( )
protectedvirtual

◆ UpdateParam()

virtual void nw::snd::internal::BasicSound::UpdateParam ( )
protectedvirtual

◆ IsPlayerAvailable()

bool nw::snd::internal::BasicSound::IsPlayerAvailable ( ) const
inlineprotected

◆ ClearIsFinalizedForCannotAllocatedResourceFlag()

void nw::snd::internal::BasicSound::ClearIsFinalizedForCannotAllocatedResourceFlag ( )
private

◆ ApplyCommonParam()

void nw::snd::internal::BasicSound::ApplyCommonParam ( OutputParam & param)
private

◆ nw::snd::SoundHandle

friend class nw::snd::SoundHandle
friend

Member Data Documentation

◆ PRIORITY_MIN

const int nw::snd::internal::BasicSound::PRIORITY_MIN = 0
static

◆ PRIORITY_MAX

const int nw::snd::internal::BasicSound::PRIORITY_MAX = 127
static

◆ INVALID_ID

const u32 nw::snd::internal::BasicSound::INVALID_ID = 0xffffffff
static

◆ m_pPlayerHeap

PlayerHeap* nw::snd::internal::BasicSound::m_pPlayerHeap
private

◆ m_pGeneralHandle

SoundHandle* nw::snd::internal::BasicSound::m_pGeneralHandle
private

◆ m_pTempGeneralHandle

SoundHandle* nw::snd::internal::BasicSound::m_pTempGeneralHandle
private

◆ m_pSoundPlayer

SoundPlayer* nw::snd::internal::BasicSound::m_pSoundPlayer
private

◆ m_pSoundActor

SoundActor* nw::snd::internal::BasicSound::m_pSoundActor
private

◆ m_pExtSoundPlayer

ExternalSoundPlayer* nw::snd::internal::BasicSound::m_pExtSoundPlayer
private

◆ m_AmbientInfo

AmbientInfo nw::snd::internal::BasicSound::m_AmbientInfo
private

◆ m_AmbientParam

SoundParam nw::snd::internal::BasicSound::m_AmbientParam
private

◆ m_ActorParam

SoundActorParam nw::snd::internal::BasicSound::m_ActorParam
private

◆ m_FadeVolume

MoveValue<f32, int> nw::snd::internal::BasicSound::m_FadeVolume
private

◆ m_PauseFadeVolume

MoveValue<f32, int> nw::snd::internal::BasicSound::m_PauseFadeVolume
private

◆ m_InitializeFlag

bool nw::snd::internal::BasicSound::m_InitializeFlag
private

◆ m_StartFlag

bool nw::snd::internal::BasicSound::m_StartFlag
private

◆ m_StartedFlag

bool nw::snd::internal::BasicSound::m_StartedFlag
private

◆ m_AutoStopFlag

bool nw::snd::internal::BasicSound::m_AutoStopFlag
private

◆ m_FadeOutFlag

bool nw::snd::internal::BasicSound::m_FadeOutFlag
private

◆ m_PlayerAvailableFlag

bool nw::snd::internal::BasicSound::m_PlayerAvailableFlag
private

◆ m_UnPauseFlag

bool nw::snd::internal::BasicSound::m_UnPauseFlag
private

◆ m_PlayerState

PlayerState nw::snd::internal::BasicSound::m_PlayerState
private

◆ m_PauseState

PauseState nw::snd::internal::BasicSound::m_PauseState
private

◆ m_AutoStopCounter

s32 nw::snd::internal::BasicSound::m_AutoStopCounter
private

◆ m_UpdateCounter

u32 nw::snd::internal::BasicSound::m_UpdateCounter
private

◆ m_Priority

u8 nw::snd::internal::BasicSound::m_Priority
private

◆ m_BiquadFilterType

s8 nw::snd::internal::BasicSound::m_BiquadFilterType
private

◆ m_Id

u32 nw::snd::internal::BasicSound::m_Id
private

◆ m_InitVolume

f32 nw::snd::internal::BasicSound::m_InitVolume
private

◆ m_Pitch

f32 nw::snd::internal::BasicSound::m_Pitch
private

◆ m_LpfFreq

f32 nw::snd::internal::BasicSound::m_LpfFreq
private

◆ m_BiquadFilterValue

f32 nw::snd::internal::BasicSound::m_BiquadFilterValue
private

◆ m_OutputLineFlag

u32 nw::snd::internal::BasicSound::m_OutputLineFlag
private

◆ _e8

u32 nw::snd::internal::BasicSound::_e8
private

◆ m_CommonParam

CommonParam nw::snd::internal::BasicSound::m_CommonParam
private

◆ m_OutputParam

OutputParam nw::snd::internal::BasicSound::m_OutputParam[OUTPUT_DEVICE_COUNT]
private

◆ m_RemoteParam

RemoteOutputParam nw::snd::internal::BasicSound::m_RemoteParam[REMOTE_OUT_COUNT]
private

◆ m_pUserParam

void* nw::snd::internal::BasicSound::m_pUserParam
private

◆ m_UserParamSize

size_t nw::snd::internal::BasicSound::m_UserParamSize
private

◆ m_PriorityLink

ut::LinkListNode nw::snd::internal::BasicSound::m_PriorityLink

◆ m_SoundPlayerPlayLink

ut::LinkListNode nw::snd::internal::BasicSound::m_SoundPlayerPlayLink

◆ m_SoundPlayerPriorityLink

ut::LinkListNode nw::snd::internal::BasicSound::m_SoundPlayerPriorityLink

◆ m_ExtSoundPlayerPlayLink

ut::LinkListNode nw::snd::internal::BasicSound::m_ExtSoundPlayerPlayLink