mathlib: LowPassFilter2p update cutoff freq min to match NotchFilter

- numerically the cutoff frequency not being smaller than 1% of the
sample frequency is probably a better choice, but we're mostly filtering
16 bit data now stored in 32 bit float
This commit is contained in:
Daniel Agar 2021-11-09 12:23:45 -05:00
parent 0d171384b3
commit 0ec3f0d2cb
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ public:
_delay_element_1 = {};
_delay_element_2 = {};
_cutoff_freq = math::constrain(cutoff_freq, 5.f, sample_freq / 2); // TODO: min based on actual numerical limit
_cutoff_freq = math::max(cutoff_freq, sample_freq * 0.001f);
_sample_freq = sample_freq;
const float fr = _sample_freq / _cutoff_freq;