summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-09-26 01:16:23 +0200
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-09-26 01:16:23 +0200
commit74dfd27bc22099301f3244048141a2fbe1e95672 (patch)
treecdef249c76b037ef13389ebe15d7a1327cfe6f56
parent73d4ae03e83cbfaacaf44d181b088fde8779b9c9 (diff)
effects/builtin/flangereffect: Fix types used for frac math
-rw-r--r--src/effects/builtin/flangereffect.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/effects/builtin/flangereffect.cpp b/src/effects/builtin/flangereffect.cpp
index 37e632e261..27a8f8c17f 100644
--- a/src/effects/builtin/flangereffect.cpp
+++ b/src/effects/builtin/flangereffect.cpp
@@ -223,7 +223,8 @@ void FlangerEffect::processChannel(const ChannelHandle& handle,
CSAMPLE prevRight = delayRight[framePrev];
CSAMPLE nextRight = delayRight[frameNext];
- auto frac = static_cast<CSAMPLE>(delayFrames - floorf(static_cast<CSAMPLE>(delayFrames)));
+ const CSAMPLE_GAIN frac = static_cast<CSAMPLE_GAIN>(
+ delayFrames - floorf(static_cast<float>(delayFrames)));
CSAMPLE delayedSampleLeft = prevLeft + frac * (nextLeft - prevLeft);
CSAMPLE delayedSampleRight = prevRight + frac * (nextRight - prevRight);