42 Ead(
unsigned int update_rate) : UPDATE_RATE(update_rate)
76 void set(
unsigned int attack_ms,
unsigned int decay_ms)
102 void start(
unsigned int attack_ms,
unsigned int decay_ms)
124 attack_phase =
false;
127 Q8n24state -= (Q8n24state * Q8n8decay)>>8;
139 const unsigned int UPDATE_RATE;
144 float millisToOneMinusRealPole(
unsigned int milliseconds)
146 static const float NUMERATOR = 1000.0f * log(0.001f);
147 return -expm1(NUMERATOR / ((
float)UPDATE_RATE * milliseconds));