diff --git a/libraries/lib-math/Dither.cpp b/libraries/lib-math/Dither.cpp index c45d9c9e88..e78482b9b6 100644 --- a/libraries/lib-math/Dither.cpp +++ b/libraries/lib-math/Dither.cpp @@ -264,7 +264,7 @@ void Dither::Apply(enum DitherType ditherType, // No need to dither, because source and destination // format are the same. Just copy samples. if (destStride == 1 && sourceStride == 1) - memcpy(dest, source, len * SAMPLE_SIZE(destFormat)); + memcpy(dest, source, static_cast(len) * SAMPLE_SIZE(destFormat)); else { if (sourceFormat == floatSample) diff --git a/src/SpectrumAnalyst.cpp b/src/SpectrumAnalyst.cpp index b0489a3ba9..87ffbc7e3d 100644 --- a/src/SpectrumAnalyst.cpp +++ b/src/SpectrumAnalyst.cpp @@ -352,8 +352,8 @@ float SpectrumAnalyst::GetProcessedValue(float freq0, float freq1) const float bin0, bin1, binwidth; if (mAlg == Spectrum) { - bin0 = freq0 * static_cast(mWindowSize) / mRate; - bin1 = freq1 * static_cast(mWindowSize) / mRate; + bin0 = static_cast(freq0) * mWindowSize / mRate; + bin1 = static_cast(freq1) * mWindowSize / mRate; } else { bin0 = freq0 * mRate; bin1 = freq1 * mRate;