From 1eb1f4ac154671c8cd10b400f57157121031b495 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Fri, 27 Aug 2021 05:18:37 +0200 Subject: [PATCH] fix order for butterworth cascade --- src/dsp/biquad.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsp/biquad.rs b/src/dsp/biquad.rs index 0139f7d..fe85964 100644 --- a/src/dsp/biquad.rs +++ b/src/dsp/biquad.rs @@ -234,7 +234,7 @@ impl Oversampling { let filters_len = self.filters.len(); for (i, filt) in self.filters.iter_mut().enumerate() { - let q = BiquadCoefs::calc_cascaded_butter_q(4, filters_len - i); + let q = BiquadCoefs::calc_cascaded_butter_q(2 * 4, filters_len - i); filt.set_coefs(BiquadCoefs::lowpass(ovr_srate, q, cutoff)); }