fix lpf
This commit is contained in:
parent
84ebc9826a
commit
7917a4c1f0
1 changed files with 1 additions and 1 deletions
|
|
@ -233,7 +233,7 @@ fn get_scale(samples: &[f64]) -> f64 {
|
|||
fn filter(samples: &mut [f64], filter: f64) {
|
||||
let mut f = samples[0];
|
||||
for sample in samples.iter_mut().skip(1) {
|
||||
f = (f * filter + *sample) / filter + 1.0;
|
||||
f = (f * filter + *sample) / (filter + 1.0);
|
||||
*sample = f;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue