| 101 | |
| 102 | /// Get current statistics (for monitoring/debugging) |
| 103 | struct Stats { |
| 104 | float currentGain = 1.0f; // Current gain multiplier |
| 105 | float peakEnvelope = 0.0f; // Current peak envelope estimate |
| 106 | float targetGain = 1.0f; // Target gain from PI controller |
| 107 | float integrator = 0.0f; // PI integrator state |
| 108 | float inputRMS = 0.0f; // Most recent input RMS |
| 109 | float outputRMS = 0.0f; // Most recent output RMS |
| 110 | u32 samplesProcessed = 0; // Total samples processed |
| 111 | }; |
| 112 | |
| 113 | const Stats& getStats() const { return mStats; } |
| 114 |
no outgoing calls