| 63 | } |
| 64 | |
| 65 | void AutoGain::reset() { |
| 66 | mPeakEnvelope.reset(mConfig.targetRMSLevel); |
| 67 | mIntegrator = 0.0f; |
| 68 | mLastGain = 1.0f; |
| 69 | mStats.currentGain = 1.0f; |
| 70 | mStats.peakEnvelope = mConfig.targetRMSLevel; |
| 71 | mStats.targetGain = 1.0f; |
| 72 | mStats.integrator = 0.0f; |
| 73 | mStats.inputRMS = 0.0f; |
| 74 | mStats.outputRMS = 0.0f; |
| 75 | mStats.samplesProcessed = 0; |
| 76 | } |
| 77 | |
| 78 | Sample AutoGain::process(const Sample& sample) { |
| 79 | // Pass through if disabled |