From ac93e0cbd38ba27bd42debcc710496c645498d53 Mon Sep 17 00:00:00 2001 From: Paul Fd Date: Sun, 15 Mar 2020 14:04:22 +0100 Subject: [PATCH] Remove the synth recreations --- vst/SfizzVstProcessor.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/vst/SfizzVstProcessor.cpp b/vst/SfizzVstProcessor.cpp index ea87680f..cc86e65e 100644 --- a/vst/SfizzVstProcessor.cpp +++ b/vst/SfizzVstProcessor.cpp @@ -48,10 +48,6 @@ tresult PLUGIN_API SfizzVstProcessor::initialize(FUnknown* context) fprintf(stderr, "[sfizz] new synth\n"); _synth.reset(new sfz::Sfizz); - if (!_synth) { - fprintf(stderr, "[sfizz] Could not create synth!\n"); - return kResultFalse; - } return result; } @@ -114,16 +110,8 @@ tresult PLUGIN_API SfizzVstProcessor::setActive(TBool state) { sfz::Sfizz* synth = _synth.get(); - if (!synth) { - fprintf(stderr, "[sfizz] Synth was destroyed? Trying to recreate...\n"); - synth = new sfz::Sfizz; - if (!synth) { - fprintf(stderr, "[sfizz] Something is very wrong\n"); - return kResultFalse; - } - _synth.reset(synth); - syncStateToSynth(); - } + if (!synth) + return kResultFalse; if (state) { _synth->setSampleRate(processSetup.sampleRate);