Add a comment to check into an out-of-range value later

This commit is contained in:
Chris Robinson 2023-01-28 04:07:06 -08:00
parent 75276a427e
commit 5d73cbe80e

View File

@ -14,7 +14,11 @@
template<typename Real>
void BiquadFilterR<Real>::setParams(BiquadType type, Real f0norm, Real gain, Real rcpQ)
{
// Limit gain to -100dB
/* HACK: Limit gain to -100dB. This shouldn't ever happen, all callers
* already clamp to minimum of 0.001, or have a limited range of values
* that don't go below 0.126. But it seems to with some callers. This needs
* to be investigated.
*/
gain = std::max(gain, Real(0.00001));
const Real w0{al::numbers::pi_v<Real>*2.0f * f0norm};