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

#include <EnvGenerator.h>

Public Types

enum  Status { STATUS_ATTACK = 0 , STATUS_DECAY , STATUS_SUSTAIN , STATUS_RELEASE }
 
typedef enum nw4hbm::snd::detail::EnvGenerator::Status Status
 

Public Member Functions

 EnvGenerator ()
 
void Init ()
 
void Reset ()
 
f32 GetValue () const
 
void Update (int msec)
 
Status GetStatus () const
 
void SetStatus (Status status)
 
void SetAttack (int attack)
 
void SetDecay (int decay)
 
void SetSustain (int sustain)
 
void SetRelease (int release)
 

Private Member Functions

f32 CalcRelease (int release)
 
int CalcDecibelSquare (int scale)
 

Private Attributes

Status mStatus
 
f32 mValue
 
f32 mDecay
 
f32 mRelease
 
f32 mAttack
 
u8 mSustain
 
u16 padding
 

Static Private Attributes

static const int DECIBEL_SQUARE_TABLE_SIZE = 128
 
static const vf32 VOLUME_INIT
 
static const int ATTACK_INIT = 127
 
static const int DECAY_INIT = 127
 
static const int SUSTAIN_INIT = 127
 
static const int RELEASE_INIT = 127
 
static const s16 DecibelSquareTable [DECIBEL_SQUARE_TABLE_SIZE]
 

Member Typedef Documentation

◆ Status

Member Enumeration Documentation

◆ Status

Enumerator
STATUS_ATTACK 
STATUS_DECAY 
STATUS_SUSTAIN 
STATUS_RELEASE 

Constructor & Destructor Documentation

◆ EnvGenerator()

nw4hbm::snd::detail::EnvGenerator::EnvGenerator ( )

Member Function Documentation

◆ CalcDecibelSquare()

int nw4hbm::snd::detail::EnvGenerator::CalcDecibelSquare ( int scale)
private

◆ CalcRelease()

f32 nw4hbm::snd::detail::EnvGenerator::CalcRelease ( int release)
private

◆ GetStatus()

Status nw4hbm::snd::detail::EnvGenerator::GetStatus ( ) const
inline

◆ GetValue()

f32 nw4hbm::snd::detail::EnvGenerator::GetValue ( ) const

◆ Init()

void nw4hbm::snd::detail::EnvGenerator::Init ( )

◆ Reset()

void nw4hbm::snd::detail::EnvGenerator::Reset ( )

◆ SetAttack()

void nw4hbm::snd::detail::EnvGenerator::SetAttack ( int attack)

◆ SetDecay()

void nw4hbm::snd::detail::EnvGenerator::SetDecay ( int decay)

◆ SetRelease()

void nw4hbm::snd::detail::EnvGenerator::SetRelease ( int release)

◆ SetStatus()

void nw4hbm::snd::detail::EnvGenerator::SetStatus ( Status status)
inline

◆ SetSustain()

void nw4hbm::snd::detail::EnvGenerator::SetSustain ( int sustain)

◆ Update()

void nw4hbm::snd::detail::EnvGenerator::Update ( int msec)

Member Data Documentation

◆ ATTACK_INIT

const int nw4hbm::snd::detail::EnvGenerator::ATTACK_INIT = 127
staticprivate

◆ DECAY_INIT

const int nw4hbm::snd::detail::EnvGenerator::DECAY_INIT = 127
staticprivate

◆ DECIBEL_SQUARE_TABLE_SIZE

const int nw4hbm::snd::detail::EnvGenerator::DECIBEL_SQUARE_TABLE_SIZE = 128
staticprivate

◆ DecibelSquareTable

const s16 nw4hbm::snd::detail::EnvGenerator::DecibelSquareTable[DECIBEL_SQUARE_TABLE_SIZE]
staticprivate

◆ mAttack

f32 nw4hbm::snd::detail::EnvGenerator::mAttack
private

◆ mDecay

f32 nw4hbm::snd::detail::EnvGenerator::mDecay
private

◆ mRelease

f32 nw4hbm::snd::detail::EnvGenerator::mRelease
private

◆ mStatus

Status nw4hbm::snd::detail::EnvGenerator::mStatus
private

◆ mSustain

u8 nw4hbm::snd::detail::EnvGenerator::mSustain
private

◆ mValue

f32 nw4hbm::snd::detail::EnvGenerator::mValue
private

◆ padding

u16 nw4hbm::snd::detail::EnvGenerator::padding
private

◆ RELEASE_INIT

const int nw4hbm::snd::detail::EnvGenerator::RELEASE_INIT = 127
staticprivate

◆ SUSTAIN_INIT

const int nw4hbm::snd::detail::EnvGenerator::SUSTAIN_INIT = 127
staticprivate

◆ VOLUME_INIT

const vf32 nw4hbm::snd::detail::EnvGenerator::VOLUME_INIT
staticprivate

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