From d3c13e0e409c56364a661889bd227e87ff05ad13 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 25 Jul 2023 18:31:01 +0200 Subject: [PATCH] core/soundcvt: typo --- nihav-core/src/soundcvt/resample.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5