NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
nw4r::snd::detail::EnvGenerator Class Reference

Description

Definition at line 17 of file snd_EnvGenerator.h.

Public Types

enum  Status {
  STATUS_ATTACK ,
  STATUS_HOLD ,
  STATUS_DECAY ,
  STATUS_SUSTAIN ,
  STATUS_RELEASE
}
 

Public Member Functions

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

Static Public Attributes

static int const CALC_DECIBEL_SCALE_MAX
 
static int const DECIBEL_SQUARE_TABLE_SIZE = 128
 
static int const RELEASE_INIT = 127
 
static int const SUSTAIN_INIT = 127
 
static int const DECAY_INIT = 127
 
static int const HOLD_INIT = 0
 
static int const ATTACK_INIT = 127
 
static f32 const volatile VOLUME_INIT
 

Private Member Functions

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

Private Attributes

Status mStatus
 
f32 mValue
 
f32 mDecay
 
f32 mRelease
 
f32 mAttack
 
u8 mSustain
 
u16 mHold
 
u16 mHoldCounter
 

Static Private Attributes

static s16 const DecibelSquareTable [DECIBEL_SQUARE_TABLE_SIZE]
 

Member Enumeration Documentation

◆ Status

enum nw4r::snd::detail::EnvGenerator::Status

Definition at line 22 of file snd_EnvGenerator.h.

Member Function Documentation

◆ GetStatus()

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

Definition at line 41 of file snd_EnvGenerator.h.

◆ SetStatus()

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

Definition at line 44 of file snd_EnvGenerator.h.

Member Data Documentation

◆ CALC_DECIBEL_SCALE_MAX

int const nw4r::snd::detail::EnvGenerator::CALC_DECIBEL_SCALE_MAX
static

Definition at line 57 of file snd_EnvGenerator.h.

◆ DECIBEL_SQUARE_TABLE_SIZE

int const nw4r::snd::detail::EnvGenerator::DECIBEL_SQUARE_TABLE_SIZE = 128
static

Definition at line 59 of file snd_EnvGenerator.h.

◆ RELEASE_INIT

int const nw4r::snd::detail::EnvGenerator::RELEASE_INIT = 127
static

Definition at line 61 of file snd_EnvGenerator.h.

◆ SUSTAIN_INIT

int const nw4r::snd::detail::EnvGenerator::SUSTAIN_INIT = 127
static

Definition at line 62 of file snd_EnvGenerator.h.

◆ DECAY_INIT

int const nw4r::snd::detail::EnvGenerator::DECAY_INIT = 127
static

Definition at line 63 of file snd_EnvGenerator.h.

◆ HOLD_INIT

int const nw4r::snd::detail::EnvGenerator::HOLD_INIT = 0
static

Definition at line 64 of file snd_EnvGenerator.h.

◆ ATTACK_INIT

int const nw4r::snd::detail::EnvGenerator::ATTACK_INIT = 127
static

Definition at line 65 of file snd_EnvGenerator.h.

◆ VOLUME_INIT

f32 const volatile nw4r::snd::detail::EnvGenerator::VOLUME_INIT
static

Definition at line 66 of file snd_EnvGenerator.h.

◆ DecibelSquareTable

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

Definition at line 69 of file snd_EnvGenerator.h.

◆ mStatus

Status nw4r::snd::detail::EnvGenerator::mStatus
private

Definition at line 73 of file snd_EnvGenerator.h.

◆ mValue

f32 nw4r::snd::detail::EnvGenerator::mValue
private

Definition at line 74 of file snd_EnvGenerator.h.

◆ mDecay

f32 nw4r::snd::detail::EnvGenerator::mDecay
private

Definition at line 75 of file snd_EnvGenerator.h.

◆ mRelease

f32 nw4r::snd::detail::EnvGenerator::mRelease
private

Definition at line 76 of file snd_EnvGenerator.h.

◆ mAttack

f32 nw4r::snd::detail::EnvGenerator::mAttack
private

Definition at line 77 of file snd_EnvGenerator.h.

◆ mSustain

u8 nw4r::snd::detail::EnvGenerator::mSustain
private

Definition at line 78 of file snd_EnvGenerator.h.

◆ mHold

u16 nw4r::snd::detail::EnvGenerator::mHold
private

Definition at line 80 of file snd_EnvGenerator.h.

◆ mHoldCounter

u16 nw4r::snd::detail::EnvGenerator::mHoldCounter
private

Definition at line 81 of file snd_EnvGenerator.h.