1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2024-12-23 18:15:46 -05:00

Reenable gain clamping

This commit is contained in:
Geoffrey Merck 2020-02-03 20:10:40 +01:00
parent 3c06fb0ac1
commit f936d8ffeb

View File

@ -81,10 +81,10 @@ void CAGC::Apply(uint8 * voice, int size)
m_Gain *= exp( -0.5f * m_Alpha * log(m_EnergyPrime) );
// clamp gain
/*if (m_Gain > m_GainMax)
if (m_Gain > m_GainMax)
m_Gain = m_GainMax;
else if(m_Gain < m_GainMin)
m_Gain = m_GainMin;*/
m_Gain = m_GainMin;
//write processed sample back
voice[i] = HIBYTE((short)output);