From: Kostya Shishkov Date: Tue, 25 Jul 2023 16:31:01 +0000 (+0200) Subject: core/soundcvt: typo X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=d3c13e0e409c56364a661889bd227e87ff05ad13;p=nihav.git core/soundcvt: typo --- diff --git a/nihav-core/src/soundcvt/resample.rs b/nihav-core/src/soundcvt/resample.rs index 1315f09..9c612f9 100644 --- a/nihav-core/src/soundcvt/resample.rs +++ b/nihav-core/src/soundcvt/resample.rs @@ -79,7 +79,7 @@ fn gen_sinc_coeffs(order: usize, num: usize, den: usize, norm: f32) -> Vec *coef = norm; continue; } - let wval = f64::from((pos * win_scale).min(-1.0).max(1.0)); + let wval = f64::from((pos * win_scale).max(-1.0).min(1.0)); let win = bessel_i0(BESSEL_BETA - (1.0 - wval * wval).sqrt()) as f32; *coef = norm * (pos * sinc_scale).sinc() * win; }