| 19 | AutoGain::~AutoGain() FL_NOEXCEPT = default; |
| 20 | |
| 21 | void AutoGain::configure(const AutoGainConfig& config) { |
| 22 | mConfig = config; |
| 23 | resolvePreset(); |
| 24 | // Initialize peak envelope to targetRMSLevel so initial gain is ~1.0 |
| 25 | mPeakEnvelope.reset(mConfig.targetRMSLevel); |
| 26 | mStats.peakEnvelope = mConfig.targetRMSLevel; |
| 27 | } |
| 28 | |
| 29 | void AutoGain::resolvePreset() { |
| 30 | switch (mConfig.preset) { |
no test coverage detected