summaryrefslogtreecommitdiffstats
path: root/src/server/internals/Controller.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-02 11:02:58 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 12:51:09 +0200
commitd6d3cfeb3fc8dfd73998c2fee5f319b75f6757ff (patch)
tree8f2b25c77c66a012912cd8c89d571ef068e114b9 /src/server/internals/Controller.cpp
parentc17ac70512d473fa6ab6b2f4c9fb0bd4e716d3c6 (diff)
downloadingen-d6d3cfeb3fc8dfd73998c2fee5f319b75f6757ff.tar.gz
ingen-d6d3cfeb3fc8dfd73998c2fee5f319b75f6757ff.tar.bz2
ingen-d6d3cfeb3fc8dfd73998c2fee5f319b75f6757ff.zip
Fix double-promotion warnings
Diffstat (limited to 'src/server/internals/Controller.cpp')
-rw-r--r--src/server/internals/Controller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index 0d38bc43..f2498eba 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -157,9 +157,9 @@ ControllerNode::control(RunContext& ctx, uint8_t control_num, uint8_t val, Frame
Sample scaled_value = 0.0f;
if (log_port_val > 0.0f) {
// haaaaack, stupid negatives and logarithms
- Sample log_offset = 0;
+ Sample log_offset = 0.0f;
if (min_port_val < 0) {
- log_offset = fabs(min_port_val);
+ log_offset = fabsf(min_port_val);
}
const Sample min = logf(min_port_val + 1 + log_offset);
const Sample max = logf(max_port_val + 1 + log_offset);