From 74fb113fbb5d8ccf509ea3a984098699b4e44ce2 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 4 Jul 2023 15:09:02 -0400 Subject: [PATCH] Remove a squanky self assign in Flanger (#13) https://github.com/surge-synthesizer/surge/issues/7083 basically rewrite a bit of code which threw a warning for good reason. --- include/sst/effects/Flanger.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/sst/effects/Flanger.h b/include/sst/effects/Flanger.h index 760c6a7..24f3cb1 100644 --- a/include/sst/effects/Flanger.h +++ b/include/sst/effects/Flanger.h @@ -450,12 +450,10 @@ inline void Flanger::processBlock(float *__restrict dataL, float *__re feedbackScale *= 0.7; } - if (fbv < 0) - fbv = fbv; - else if (fbv > 1) - fbv = fbv; - else + if (fbv > 0 && fbv < 1) + { fbv = sqrt(fbv); + } feedback.newValue(feedbackScale * fbv); fb_hf_damping.newValue(0.4 * this->floatValue(fl_damping));