Filter: add dt<0 check to LPF

This commit is contained in:
Jonathan Challinger 2015-04-17 10:30:48 +09:00 committed by Randy Mackay
parent 22e1156c31
commit f20a91ec95
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ public:
// add a new raw value to the filter, retrieve the filtered result // add a new raw value to the filter, retrieve the filtered result
float apply(float sample, float cutoff_freq, float dt) { float apply(float sample, float cutoff_freq, float dt) {
if (cutoff_freq <= 0.0f) { if (cutoff_freq <= 0.0f || dt < 0.0f) {
_output = sample; _output = sample;
return _output; return _output;
} }