Skip to content
Snippets Groups Projects
Commit 294af5da authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

LowPassFilter2p: fix _cutoff_freq <= 0 (disabled filter)

If the filter was disabled, the apply() would always return 0.
parent d2e2b5e8
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ void LowPassFilter2p::set_cutoff_frequency(float sample_freq, float cutoff_freq)
if (_cutoff_freq <= 0.0f) {
// no filtering
_b0 = 0.0f;
_b0 = 1.0f;
_b1 = 0.0f;
_b2 = 0.0f;
......
......@@ -50,7 +50,7 @@ void LowPassFilter2pVector3f::set_cutoff_frequency(float sample_freq, float cuto
if (_cutoff_freq <= 0.0f) {
// no filtering
_b0 = 0.0f;
_b0 = 1.0f;
_b1 = 0.0f;
_b2 = 0.0f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment