Add the panic to the VST processor

This commit is contained in:
Paul Fd 2020-03-15 23:24:07 +01:00
parent 7d625bc736
commit 98392a7b9a

View file

@ -114,12 +114,13 @@ tresult PLUGIN_API SfizzVstProcessor::setActive(TBool state)
return kResultFalse; return kResultFalse;
if (state) { if (state) {
_synth->setSampleRate(processSetup.sampleRate); synth->setSampleRate(processSetup.sampleRate);
_synth->setSamplesPerBlock(processSetup.maxSamplesPerBlock); synth->setSamplesPerBlock(processSetup.maxSamplesPerBlock);
_workRunning = true; _workRunning = true;
_worker = std::thread([this]() { doBackgroundWork(); }); _worker = std::thread([this]() { doBackgroundWork(); });
} else { } else {
synth->allSoundOff();
stopBackgroundWork(); stopBackgroundWork();
} }