commit bda89cfdd70ef389e10871a12e8cd4149e306e2d
parent 2ba6c53a3dd47f66d073a9c43633564315b85bdf
Author: Olivier Jolly <olivier@pcedev.com>
Date: Sat, 20 Feb 2016 23:30:38 +0100
Prevent unitialized use of SUBnote global filter sense
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/Synth/SUBnote.cpp b/src/Synth/SUBnote.cpp
@@ -211,10 +211,6 @@ void SUBnote::setup(float freq,
GlobalFilter->updateNoteFreq(basefreq);
}
- if(GlobalFilter)
- GlobalFilter->updateSense(velocity, pars.PGlobalFilterVelocityScale,
- pars.PGlobalFilterVelocityScaleFunction);
-
oldamplitude = newamplitude;
}
@@ -391,6 +387,9 @@ void SUBnote::initparameters(float freq)
GlobalFilter = memory.alloc<ModFilter>(*pars.GlobalFilter, synth, time, memory, stereo, freq);
+ GlobalFilter->updateSense(velocity, pars.PGlobalFilterVelocityScale,
+ pars.PGlobalFilterVelocityScaleFunction);
+
GlobalFilter->addMod(*GlobalFilterEnvelope);
}
computecurrentparameters();