Set the power follower depending on the voice stealing algorithm also on voice re-creation

This commit is contained in:
Paul Ferrand 2020-10-14 23:31:55 +02:00
parent 07f30af7f1
commit f3776dcb35

View file

@ -1568,6 +1568,15 @@ void sfz::Synth::applySettingsPerVoice()
voice->setPitchEGEnabledPerVoice(settingsPerVoice.havePitchEG);
voice->setFilterEGEnabledPerVoice(settingsPerVoice.haveFilterEG);
}
if (stealer.getStealingAlgorithm() ==
VoiceStealing::StealingAlgorithm::EnvelopeAndAge) {
for (auto& voice : voices)
voice->enablePowerFollower();
} else {
for (auto& voice : voices)
voice->disablePowerFollower();
}
}
void sfz::Synth::setupModMatrix()