diff --git a/plugins/vst/SfizzVstProcessor.cpp b/plugins/vst/SfizzVstProcessor.cpp index 5dca65d1..536e16ea 100644 --- a/plugins/vst/SfizzVstProcessor.cpp +++ b/plugins/vst/SfizzVstProcessor.cpp @@ -13,6 +13,7 @@ #include "plugin/SfizzFileScan.h" #include "plugin/InstrumentDescription.h" #include "base/source/fstreamer.h" +#include "base/source/updatehandler.h" #include "pluginterfaces/vst/ivstevents.h" #include "pluginterfaces/vst/ivstparameterchanges.h" #include @@ -74,6 +75,9 @@ tresult PLUGIN_API SfizzVstProcessor::initialize(FUnknown* context) if (result != kResultTrue) return result; + // initialize the update handler + Steinberg::UpdateHandler::instance(); + addAudioOutput(STR16("Audio Output"), Vst::SpeakerArr::kStereo); addEventInput(STR16("Event Input"), 1); @@ -581,6 +585,20 @@ tresult PLUGIN_API SfizzVstProcessor::notify(Vst::IMessage* message) return result; } +void PLUGIN_API SfizzVstProcessor::update(FUnknown* changedUnknown, int32 message) +{ + if (processUpdate(changedUnknown, message)) + return; + + AudioEffect::update(changedUnknown, message); +} + +bool SfizzVstProcessor::processUpdate(FUnknown* changedUnknown, int32 message) +{ + // TODO + return false; +} + void SfizzVstProcessor::receiveMessage(int delay, const char* path, const char* sig, const sfizz_arg_t* args) { uint8_t* oscTemp = _oscTemp.get(); diff --git a/plugins/vst/SfizzVstProcessor.h b/plugins/vst/SfizzVstProcessor.h index 1ab35a9d..16fc47f4 100644 --- a/plugins/vst/SfizzVstProcessor.h +++ b/plugins/vst/SfizzVstProcessor.h @@ -46,6 +46,7 @@ public: void processMessagesFromUi(); tresult PLUGIN_API notify(Vst::IMessage* message) override; + void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override; static FUnknown* createInstance(void*); @@ -68,6 +69,9 @@ private: RMSFollower _rmsFollower; bool _editorIsOpen = false; + // updates + bool processUpdate(FUnknown* changedUnknown, int32 message); + // client sfz::ClientPtr _client; std::unique_ptr _oscTemp;