fix order for butterworth cascade

This commit is contained in:
Weird Constructor 2021-08-27 05:18:37 +02:00
parent c5f6478af6
commit 1eb1f4ac15

View file

@ -234,7 +234,7 @@ impl<const N: usize> Oversampling<N> {
let filters_len = self.filters.len(); let filters_len = self.filters.len();
for (i, filt) in self.filters.iter_mut().enumerate() { 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)); filt.set_coefs(BiquadCoefs::lowpass(ovr_srate, q, cutoff));
} }