aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2023-01-28 04:07:06 -0800
committerChris Robinson <chris.kcat@gmail.com>2023-01-28 04:07:06 -0800
commit5d73cbe80e276e029fd162b3213206a5fe8b437b (patch)
tree3cb4c38ff74fa1b891b14d637865e90b64a4d8a9 /core
parent75276a427e8913b52c2b14aee4b414b94b7a7f9b (diff)
Add a comment to check into an out-of-range value later
Diffstat (limited to 'core')
-rw-r--r--core/filters/biquad.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/filters/biquad.cpp b/core/filters/biquad.cpp
index 8e5ed17d..a0a62eb8 100644
--- a/core/filters/biquad.cpp
+++ b/core/filters/biquad.cpp
@@ -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};