diff --git a/include/bw_src.h b/include/bw_src.h index 5df52c4..0397135 100644 --- a/include/bw_src.h +++ b/include/bw_src.h @@ -120,8 +120,8 @@ struct _bw_src_state { static inline void bw_src_init(bw_src_coeffs *BW_RESTRICT coeffs, float ratio) { coeffs->k = ratio >= 1.f ? 1.f / ratio : -1.f / ratio; // 4th-degree Butterworth with cutoff at ratio * Nyquist, using bilinear transform w/ prewarping - const float fc = bw_minf((float)(ratio >= 1.f ? 1.f / ratio : ratio), 0.9f); - const float T = bw_tanf_3(1.570796326794896f * (float)fc); + const float fc = bw_minf(ratio >= 1.f ? 1.f / ratio : ratio, 0.9f); + const float T = bw_tanf_3(1.570796326794896f * fc); const float T2 = T * T; const float k = 1.f / (T * (T * (T * (T + 2.613125929752753f) + 3.414213562373095f) + 2.613125929752753f) + 1.f); coeffs->b0 = k * T2 * T2;