From 2976a1fbe5044fc0b94d11b14794255f363db1a2 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Sun, 13 May 2018 19:08:04 +0100 Subject: [PATCH] Avoid a couple of picky compiler warnings --- src/audiocurves/PercussiveAudioCurve.cpp | 4 ++-- src/dsp/SincWindow.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audiocurves/PercussiveAudioCurve.cpp b/src/audiocurves/PercussiveAudioCurve.cpp index 80da163..b87be5d 100644 --- a/src/audiocurves/PercussiveAudioCurve.cpp +++ b/src/audiocurves/PercussiveAudioCurve.cpp @@ -86,8 +86,8 @@ PercussiveAudioCurve::processFloat(const float *R__ mag, int increment) double PercussiveAudioCurve::processDouble(const double *R__ mag, int increment) { - static double threshold = powf(10., 0.15); // 3dB rise in square of magnitude - static double zeroThresh = powf(10., -8); + static double threshold = pow(10., 0.15); // 3dB rise in square of magnitude + static double zeroThresh = pow(10., -8); int count = 0; int nonZeroCount = 0; diff --git a/src/dsp/SincWindow.h b/src/dsp/SincWindow.h index 3e7beff..d19f135 100644 --- a/src/dsp/SincWindow.h +++ b/src/dsp/SincWindow.h @@ -107,7 +107,7 @@ public: for (int i = half + 1; i < n; ++i) { dst[target--] = dst[i]; } - const T twopi = 2. * M_PI; + const T twopi = T(2. * M_PI); T arg = T(half) * twopi / p; dst[0] = sin(arg) / arg; } @@ -127,7 +127,7 @@ protected: static void writeHalf(T *const R__ dst, const int n, const int p) { const int half = n/2; - const T twopi = 2. * M_PI; + const T twopi = T(2. * M_PI); dst[half] = T(1.0); for (int i = 1; i < half; ++i) { T arg = T(i) * twopi / p;