kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

commit d94372e0e231f9ca36834e579ef6dedc5f1dc996
parent f09c5c153b04962c2aaa208fd48d5a3bcd46988e
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Wed, 24 Jan 2024 08:43:49 +0000

explicit casts to prevent warnings

Diffstat:
Minclude/kfr/dsp/sample_rate_conversion.hpp | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/kfr/dsp/sample_rate_conversion.hpp b/include/kfr/dsp/sample_rate_conversion.hpp @@ -60,8 +60,11 @@ protected: { return modzerobessel(kaiser_beta * sqrt(1 - sqr(2 * n - 1))) * reciprocal(modzerobessel(kaiser_beta)); } - KFR_MEM_INTRINSIC ftype sidelobe_att() const { return kaiser_beta / 0.1102 + 8.7; } - KFR_MEM_INTRINSIC ftype transition_width() const { return (sidelobe_att() - 8) / (depth - 1) / 2.285; } + KFR_MEM_INTRINSIC ftype sidelobe_att() const { return static_cast<ftype>(kaiser_beta / 0.1102 + 8.7); } + KFR_MEM_INTRINSIC ftype transition_width() const + { + return static_cast<ftype>((sidelobe_att() - 8) / (depth - 1) / 2.285); + } public: static KFR_MEM_INTRINSIC size_t filter_order(sample_rate_conversion_quality quality)