From 3bd76ba574e9a3da89600e85c6c35bcb005a1317 Mon Sep 17 00:00:00 2001 From: Vasile Vilvoiu Date: Sat, 6 May 2023 16:22:03 +0300 Subject: Fix compilation issues. --- src/fft.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/fft.cpp') diff --git a/src/fft.cpp b/src/fft.cpp index d5fa4c2..5668ac8 100644 --- a/src/fft.cpp +++ b/src/fft.cpp @@ -11,6 +11,7 @@ #include #include #include +#include static double sinc(double x) @@ -25,11 +26,11 @@ sinc(double x) } else { double result = 1.0f; - if (abs(x) >= taylor_0_bound) { + if (std::abs(x) >= taylor_0_bound) { double x2 = x * x; result -= x2 / 6.0f; - if (abs(x) >= taylor_2_bound) { + if (std::abs(x) >= taylor_2_bound) { result += (x2 * x2) / 120.0f; } } @@ -239,8 +240,8 @@ FFT::Crop(const RealWindow& input, double rate, double fmin, double fmax) double di_fmax = std::round(FFT::GetFrequencyIndex(rate, input.size(), fmax)); /* we're cropping, so no interpolation allowed */ - auto i_fmin = static_cast(di_fmin); - auto i_fmax = static_cast(di_fmax); + auto i_fmin = static_cast(di_fmin); + auto i_fmax = static_cast(di_fmax); if (i_fmin < 0) { throw std::runtime_error("fmin outside of window"); -- cgit v1.2.3