Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
nw4hbm::snd::detail::Channel Class Reference

#include <Channel.h>

+ Inheritance diagram for nw4hbm::snd::detail::Channel:
+ Collaboration diagram for nw4hbm::snd::detail::Channel:

Public Types

enum  ChannelCallbackStatus { CALLBACK_STATUS_STOPPED = 0 , CALLBACK_STATUS_DROP , CALLBACK_STATUS_FINISH , CALLBACK_STATUS_CANCEL }
 
enum  LfoTarget { LFO_TARGET_PITCH = 0 , LFO_TARGET_VOLUME , LFO_TARGET_PAN }
 
typedef enum nw4hbm::snd::detail::Channel::ChannelCallbackStatus ChannelCallbackStatus
 
typedef void(*) ChannelCallback(Channel *dropChannel, ChannelCallbackStatus status, u32 callbackArg)
 
typedef enum nw4hbm::snd::detail::Channel::LfoTarget LfoTarget
 

Public Member Functions

 Channel ()
 
 ~Channel ()
 
void InitParam (ChannelCallback callback, u32 callbackArg)
 
void Update (bool doPeriodicProc)
 
void Start (const WaveData &waveData, s32 length)
 
void Release ()
 
void Stop ()
 
void SetAttack (int attack)
 
void SetDecay (int decay)
 
void SetSustain (int sustain)
 
void SetRelease (int release)
 
bool IsRelease () const
 
void SetLfoParam (const LfoParam &rParam)
 
void SetLfoTarget (LfoTarget target)
 
void Pause (bool pause)
 
bool IsPause () const
 
bool IsActive () const
 
bool IsAutoUpdateSweep () const
 
void SetUserVolume (f32 volume)
 
void SetUserPitch (f32 pitch)
 
void SetUserPitchRatio (f32 ratio)
 
void SetUserPan (f32 pan)
 
void SetUserSurroundPan (f32 pan)
 
void SetUserPan2 (f32 pan2)
 
void SetUserSurroundPan2 (f32 pan2)
 
void SetUserLpfFreq (f32 freq)
 
void SetOutputLine (int flag)
 
void SetMainOutVolume (f32 volume)
 
void SetMainSend (f32 send)
 
void SetFxSend (AuxBus bus, f32 send)
 
void SetSilence (bool silence, int fadeTimes)
 
void SetRemoteOutVolume (int remoteIndex, f32 volume)
 
void SetRemoteSend (int remoteIndex, f32 send)
 
void SetRemoteFxSend (int remoteIndex, f32 send)
 
void UpdateSweep (int count)
 
void SetSweepParam (f32 pitch, int time, bool autoUpdate)
 
f32 GetSweepValue () const
 
void SetInitVolume (f32 volume)
 
void SetInitPan (f32 pan)
 
void SetInitSurroundPan (f32 pan)
 
void SetTune (f32 tune)
 
void SetKey (int key)
 
void SetOriginalKey (int key)
 
s32 GetLength () const
 
void SetLength (s32 length)
 
ChannelGetNextTrackChannel () const
 
void SetNextTrackChannel (Channel *channel)
 

Static Public Member Functions

static void UpdateAllChannel ()
 
static ChannelAllocChannel (int channels, int voices, int priority, ChannelCallback pCallback, u32 callbackArg)
 
static void FreeChannel (Channel *channel)
 
static void VoiceCallback (AxVoice *voice, AxVoice::CallbackStatus status, void *arg)
 

Private Attributes

EnvGenerator mEnvelope
 
Lfo mLfo
 
u8 mLfoTarget
 
bool mPauseFlag
 
bool mActiveFlag
 
bool mAllocFlag
 
bool mAutoSweep
 
f32 mUserVolume
 
f32 mUserPitchRatio
 
f32 mUserPan
 
f32 mUserSurroundPan
 
f32 mUserPan2
 
f32 mUserSurroundPan2
 
f32 mUserLpfFreq
 
int mOutputLineFlag
 
f32 mMainOutVolume
 
f32 mMainSend
 
f32 mFxSend [AUX_BUS_NUM]
 
f32 mRemoteOutVolume [WPAD_MAX_CONTROLLERS]
 
f32 mRemoteSend [WPAD_MAX_CONTROLLERS]
 
f32 mRemoteFxSend [WPAD_MAX_CONTROLLERS]
 
f32 mUserPitch
 
f32 mSweepPitch
 
s32 mSweepCounter
 
s32 mSweepLength
 
f32 mInitVolume
 
f32 mInitPan
 
f32 mInitSurroundPan
 
f32 mTune
 
MoveValue< u8, u16mSilenceVolume
 
int mKey
 
int mOriginalKey
 
s32 mLength
 
ChannelCallback mCallback
 
u32 mCallbackData
 
AxVoicemVoice
 
ChannelmNextLink
 

Static Private Attributes

static const u8 SILENCE_VOLUME_MAX = 255
 
static const int KEY_INIT = 60
 
static const int ORIGINAL_KEY_INIT = 60
 
static const int PRIORITY_RELEASE = 1
 
static Channel mChannel [AX_MAX_VOICES+1]
 

Additional Inherited Members

- Public Attributes inherited from nw4hbm::snd::LinkedInstance
ut::LinkListNode mInstanceLink
 

Member Typedef Documentation

◆ ChannelCallback

void(*) nw4hbm::snd::detail::Channel::ChannelCallback(Channel *dropChannel, ChannelCallbackStatus status, u32 callbackArg)

◆ ChannelCallbackStatus

◆ LfoTarget

Member Enumeration Documentation

◆ ChannelCallbackStatus

Enumerator
CALLBACK_STATUS_STOPPED 
CALLBACK_STATUS_DROP 
CALLBACK_STATUS_FINISH 
CALLBACK_STATUS_CANCEL 

◆ LfoTarget

Enumerator
LFO_TARGET_PITCH 
LFO_TARGET_VOLUME 
LFO_TARGET_PAN 

Constructor & Destructor Documentation

◆ Channel()

nw4hbm::snd::detail::Channel::Channel ( )

◆ ~Channel()

nw4hbm::snd::detail::Channel::~Channel ( )

Member Function Documentation

◆ AllocChannel()

static Channel * nw4hbm::snd::detail::Channel::AllocChannel ( int channels,
int voices,
int priority,
ChannelCallback pCallback,
u32 callbackArg )
static

◆ FreeChannel()

static void nw4hbm::snd::detail::Channel::FreeChannel ( Channel * channel)
static

◆ GetLength()

s32 nw4hbm::snd::detail::Channel::GetLength ( ) const
inline

◆ GetNextTrackChannel()

Channel * nw4hbm::snd::detail::Channel::GetNextTrackChannel ( ) const
inline

◆ GetSweepValue()

f32 nw4hbm::snd::detail::Channel::GetSweepValue ( ) const

◆ InitParam()

void nw4hbm::snd::detail::Channel::InitParam ( ChannelCallback callback,
u32 callbackArg )

◆ IsActive()

bool nw4hbm::snd::detail::Channel::IsActive ( ) const
inline

◆ IsAutoUpdateSweep()

bool nw4hbm::snd::detail::Channel::IsAutoUpdateSweep ( ) const
inline

◆ IsPause()

bool nw4hbm::snd::detail::Channel::IsPause ( ) const
inline

◆ IsRelease()

bool nw4hbm::snd::detail::Channel::IsRelease ( ) const
inline

◆ Pause()

void nw4hbm::snd::detail::Channel::Pause ( bool pause)
inline

◆ Release()

void nw4hbm::snd::detail::Channel::Release ( )

◆ SetAttack()

void nw4hbm::snd::detail::Channel::SetAttack ( int attack)
inline

◆ SetDecay()

void nw4hbm::snd::detail::Channel::SetDecay ( int decay)
inline

◆ SetFxSend()

void nw4hbm::snd::detail::Channel::SetFxSend ( AuxBus bus,
f32 send )
inline

◆ SetInitPan()

void nw4hbm::snd::detail::Channel::SetInitPan ( f32 pan)
inline

◆ SetInitSurroundPan()

void nw4hbm::snd::detail::Channel::SetInitSurroundPan ( f32 pan)
inline

◆ SetInitVolume()

void nw4hbm::snd::detail::Channel::SetInitVolume ( f32 volume)
inline

◆ SetKey()

void nw4hbm::snd::detail::Channel::SetKey ( int key)
inline

◆ SetLength()

void nw4hbm::snd::detail::Channel::SetLength ( s32 length)
inline

◆ SetLfoParam()

void nw4hbm::snd::detail::Channel::SetLfoParam ( const LfoParam & rParam)
inline

◆ SetLfoTarget()

void nw4hbm::snd::detail::Channel::SetLfoTarget ( LfoTarget target)
inline

◆ SetMainOutVolume()

void nw4hbm::snd::detail::Channel::SetMainOutVolume ( f32 volume)
inline

◆ SetMainSend()

void nw4hbm::snd::detail::Channel::SetMainSend ( f32 send)
inline

◆ SetNextTrackChannel()

void nw4hbm::snd::detail::Channel::SetNextTrackChannel ( Channel * channel)
inline

◆ SetOriginalKey()

void nw4hbm::snd::detail::Channel::SetOriginalKey ( int key)
inline

◆ SetOutputLine()

void nw4hbm::snd::detail::Channel::SetOutputLine ( int flag)
inline

◆ SetRelease()

void nw4hbm::snd::detail::Channel::SetRelease ( int release)
inline

◆ SetRemoteFxSend()

void nw4hbm::snd::detail::Channel::SetRemoteFxSend ( int remoteIndex,
f32 send )
inline

◆ SetRemoteOutVolume()

void nw4hbm::snd::detail::Channel::SetRemoteOutVolume ( int remoteIndex,
f32 volume )
inline

◆ SetRemoteSend()

void nw4hbm::snd::detail::Channel::SetRemoteSend ( int remoteIndex,
f32 send )
inline

◆ SetSilence()

void nw4hbm::snd::detail::Channel::SetSilence ( bool silence,
int fadeTimes )
inline

◆ SetSustain()

void nw4hbm::snd::detail::Channel::SetSustain ( int sustain)
inline

◆ SetSweepParam()

void nw4hbm::snd::detail::Channel::SetSweepParam ( f32 pitch,
int time,
bool autoUpdate )

◆ SetTune()

void nw4hbm::snd::detail::Channel::SetTune ( f32 tune)
inline

◆ SetUserLpfFreq()

void nw4hbm::snd::detail::Channel::SetUserLpfFreq ( f32 freq)
inline

◆ SetUserPan()

void nw4hbm::snd::detail::Channel::SetUserPan ( f32 pan)
inline

◆ SetUserPan2()

void nw4hbm::snd::detail::Channel::SetUserPan2 ( f32 pan2)
inline

◆ SetUserPitch()

void nw4hbm::snd::detail::Channel::SetUserPitch ( f32 pitch)
inline

◆ SetUserPitchRatio()

void nw4hbm::snd::detail::Channel::SetUserPitchRatio ( f32 ratio)
inline

◆ SetUserSurroundPan()

void nw4hbm::snd::detail::Channel::SetUserSurroundPan ( f32 pan)
inline

◆ SetUserSurroundPan2()

void nw4hbm::snd::detail::Channel::SetUserSurroundPan2 ( f32 pan2)
inline

◆ SetUserVolume()

void nw4hbm::snd::detail::Channel::SetUserVolume ( f32 volume)
inline

◆ Start()

void nw4hbm::snd::detail::Channel::Start ( const WaveData & waveData,
s32 length )

◆ Stop()

void nw4hbm::snd::detail::Channel::Stop ( )

◆ Update()

void nw4hbm::snd::detail::Channel::Update ( bool doPeriodicProc)

◆ UpdateAllChannel()

static void nw4hbm::snd::detail::Channel::UpdateAllChannel ( )
static

◆ UpdateSweep()

void nw4hbm::snd::detail::Channel::UpdateSweep ( int count)

◆ VoiceCallback()

static void nw4hbm::snd::detail::Channel::VoiceCallback ( AxVoice * voice,
AxVoice::CallbackStatus status,
void * arg )
static

Member Data Documentation

◆ KEY_INIT

const int nw4hbm::snd::detail::Channel::KEY_INIT = 60
staticprivate

◆ mActiveFlag

bool nw4hbm::snd::detail::Channel::mActiveFlag
private

◆ mAllocFlag

bool nw4hbm::snd::detail::Channel::mAllocFlag
private

◆ mAutoSweep

bool nw4hbm::snd::detail::Channel::mAutoSweep
private

◆ mCallback

ChannelCallback nw4hbm::snd::detail::Channel::mCallback
private

◆ mCallbackData

u32 nw4hbm::snd::detail::Channel::mCallbackData
private

◆ mChannel

Channel nw4hbm::snd::detail::Channel::mChannel[AX_MAX_VOICES+1]
staticprivate

◆ mEnvelope

EnvGenerator nw4hbm::snd::detail::Channel::mEnvelope
private

◆ mFxSend

f32 nw4hbm::snd::detail::Channel::mFxSend[AUX_BUS_NUM]
private

◆ mInitPan

f32 nw4hbm::snd::detail::Channel::mInitPan
private

◆ mInitSurroundPan

f32 nw4hbm::snd::detail::Channel::mInitSurroundPan
private

◆ mInitVolume

f32 nw4hbm::snd::detail::Channel::mInitVolume
private

◆ mKey

int nw4hbm::snd::detail::Channel::mKey
private

◆ mLength

s32 nw4hbm::snd::detail::Channel::mLength
private

◆ mLfo

Lfo nw4hbm::snd::detail::Channel::mLfo
private

◆ mLfoTarget

u8 nw4hbm::snd::detail::Channel::mLfoTarget
private

◆ mMainOutVolume

f32 nw4hbm::snd::detail::Channel::mMainOutVolume
private

◆ mMainSend

f32 nw4hbm::snd::detail::Channel::mMainSend
private

◆ mNextLink

Channel* nw4hbm::snd::detail::Channel::mNextLink
private

◆ mOriginalKey

int nw4hbm::snd::detail::Channel::mOriginalKey
private

◆ mOutputLineFlag

int nw4hbm::snd::detail::Channel::mOutputLineFlag
private

◆ mPauseFlag

bool nw4hbm::snd::detail::Channel::mPauseFlag
private

◆ mRemoteFxSend

f32 nw4hbm::snd::detail::Channel::mRemoteFxSend[WPAD_MAX_CONTROLLERS]
private

◆ mRemoteOutVolume

f32 nw4hbm::snd::detail::Channel::mRemoteOutVolume[WPAD_MAX_CONTROLLERS]
private

◆ mRemoteSend

f32 nw4hbm::snd::detail::Channel::mRemoteSend[WPAD_MAX_CONTROLLERS]
private

◆ mSilenceVolume

MoveValue<u8, u16> nw4hbm::snd::detail::Channel::mSilenceVolume
private

◆ mSweepCounter

s32 nw4hbm::snd::detail::Channel::mSweepCounter
private

◆ mSweepLength

s32 nw4hbm::snd::detail::Channel::mSweepLength
private

◆ mSweepPitch

f32 nw4hbm::snd::detail::Channel::mSweepPitch
private

◆ mTune

f32 nw4hbm::snd::detail::Channel::mTune
private

◆ mUserLpfFreq

f32 nw4hbm::snd::detail::Channel::mUserLpfFreq
private

◆ mUserPan

f32 nw4hbm::snd::detail::Channel::mUserPan
private

◆ mUserPan2

f32 nw4hbm::snd::detail::Channel::mUserPan2
private

◆ mUserPitch

f32 nw4hbm::snd::detail::Channel::mUserPitch
private

◆ mUserPitchRatio

f32 nw4hbm::snd::detail::Channel::mUserPitchRatio
private

◆ mUserSurroundPan

f32 nw4hbm::snd::detail::Channel::mUserSurroundPan
private

◆ mUserSurroundPan2

f32 nw4hbm::snd::detail::Channel::mUserSurroundPan2
private

◆ mUserVolume

f32 nw4hbm::snd::detail::Channel::mUserVolume
private

◆ mVoice

AxVoice* nw4hbm::snd::detail::Channel::mVoice
private

◆ ORIGINAL_KEY_INIT

const int nw4hbm::snd::detail::Channel::ORIGINAL_KEY_INIT = 60
staticprivate

◆ PRIORITY_RELEASE

const int nw4hbm::snd::detail::Channel::PRIORITY_RELEASE = 1
staticprivate

◆ SILENCE_VOLUME_MAX

const u8 nw4hbm::snd::detail::Channel::SILENCE_VOLUME_MAX = 255
staticprivate

The documentation for this class was generated from the following file: