local variable can be const

This commit is contained in:
Paul Ferrand 2020-03-27 18:05:30 +01:00
parent 890d5ddb46
commit 281ee61146

View file

@ -60,7 +60,7 @@ void sfz::Voice::startVoice(Region* region, int delay, int number, uint8_t value
waveOscillator.setWavetable(wave);
float phase;
float phaseParam = region->oscillatorPhase;
const float phaseParam = region->oscillatorPhase;
if (phaseParam >= 0) {
phase = phaseParam * (1.0f / 360.0f);
phase -= static_cast<int>(phase);