37 void Init(f32 initDecibel);
38 void Update(
int msec);
39 void Reset(f32 initDecibel);
41 Status GetStatus()
const {
return mStatus; }
44 void SetStatus(Status status) { mStatus = status; }
45 void SetAttack(
int attack);
46 void SetHold(
int hold);
47 void SetDecay(
int decay);
48 void SetSustain(
int sustain);
49 void SetRelease(
int release);
52 f32 CalcRelease(
int release);
53 s16 CalcDecibelSquare(
int scale);
57 static int const CALC_DECIBEL_SCALE_MAX;
59 static int const DECIBEL_SQUARE_TABLE_SIZE = 128;
61 static int const RELEASE_INIT = 127;
62 static int const SUSTAIN_INIT = 127;
63 static int const DECAY_INIT = 127;
64 static int const HOLD_INIT = 0;
65 static int const ATTACK_INIT = 127;
66 static f32
const volatile VOLUME_INIT;
69 static s16
const DecibelSquareTable[DECIBEL_SQUARE_TABLE_SIZE];