Clean up the activation lists on clearing the synth

This commit is contained in:
paulfd 2019-09-28 15:57:03 +02:00
parent 07e2513e52
commit c15def27cf

View file

@ -108,6 +108,14 @@ void sfz::Synth::buildRegion(const std::vector<Opcode>& regionOpcodes)
void sfz::Synth::clear()
{
for (auto &voice: voices)
voice->reset();
for (auto& list: noteActivationLists)
list.clear();
for (auto& list: ccActivationLists)
list.clear();
regions.clear();
filePool.clear();
hasGlobal = false;
hasControl = false;
numGroups = 0;
@ -121,8 +129,6 @@ void sfz::Synth::clear()
globalOpcodes.clear();
masterOpcodes.clear();
groupOpcodes.clear();
regions.clear();
filePool.clear();
}
void sfz::Synth::handleGlobalOpcodes(const std::vector<Opcode>& members)