From 3986bc782b2144fc6cdf207584be4c58dc221a05 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 29 Apr 2021 10:05:28 +0200 Subject: [PATCH] VST renaming to lift some ambiguity --- plugins/vst/SfizzVstProcessor.cpp | 10 +++++----- plugins/vst/SfizzVstProcessor.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/vst/SfizzVstProcessor.cpp b/plugins/vst/SfizzVstProcessor.cpp index 0e7f73d0..a2d8573e 100644 --- a/plugins/vst/SfizzVstProcessor.cpp +++ b/plugins/vst/SfizzVstProcessor.cpp @@ -35,7 +35,7 @@ static const char* kRingIdOsc = "Osc"; static const char* kMsgIdSetNumVoices = "SetNumVoices"; static const char* kMsgIdSetOversampling = "SetOversampling"; static const char* kMsgIdSetPreloadSize = "SetPreloadSize"; -static const char* kMsgIdReceiveMessage = "ReceiveMessage"; +static const char* kMsgIdReceiveOSC = "ReceiveOSC"; static const char* kMsgIdNoteEvents = "NoteEvents"; static constexpr std::chrono::milliseconds kBackgroundIdleInterval { 20 }; @@ -92,7 +92,7 @@ tresult PLUGIN_API SfizzVstProcessor::initialize(FUnknown* context) auto onMessage = +[](void* data, int delay, const char* path, const char* sig, const sfizz_arg_t* args) { auto *self = reinterpret_cast(data); - self->receiveMessage(delay, path, sig, args); + self->receiveOSC(delay, path, sig, args); }; _client = _synth->createClient(this); _synth->setReceiveCallback(*_client, onMessage); @@ -605,12 +605,12 @@ bool SfizzVstProcessor::processUpdate(FUnknown* changedUnknown, int32 message) return false; } -void SfizzVstProcessor::receiveMessage(int delay, const char* path, const char* sig, const sfizz_arg_t* args) +void SfizzVstProcessor::receiveOSC(int delay, const char* path, const char* sig, const sfizz_arg_t* args) { uint8_t* oscTemp = _oscTemp.get(); uint32 oscSize = sfizz_prepare_message(oscTemp, kOscTempSize, path, sig, args); if (oscSize <= kOscTempSize) { - if (writeWorkerMessage(kMsgIdReceiveMessage, oscTemp, oscSize)) + if (writeWorkerMessage(kMsgIdReceiveOSC, oscTemp, oscSize)) _semaToWorker.post(); } } @@ -728,7 +728,7 @@ void SfizzVstProcessor::doBackgroundWork() std::lock_guard lock(_processMutex); _synth->setPreloadSize(value); } - else if (id == kMsgIdReceiveMessage) { + else if (id == kMsgIdReceiveOSC) { Steinberg::OPtr notification { allocateMessage() }; notification->setMessageID("ReceivedMessage"); notification->getAttributes()->setBinary("Message", msg->payload(), msg->size); diff --git a/plugins/vst/SfizzVstProcessor.h b/plugins/vst/SfizzVstProcessor.h index 16fc47f4..89ff1850 100644 --- a/plugins/vst/SfizzVstProcessor.h +++ b/plugins/vst/SfizzVstProcessor.h @@ -75,7 +75,7 @@ private: // client sfz::ClientPtr _client; std::unique_ptr _oscTemp; - void receiveMessage(int delay, const char* path, const char* sig, const sfizz_arg_t* args); + void receiveOSC(int delay, const char* path, const char* sig, const sfizz_arg_t* args); // misc void loadSfzFileOrDefault(const std::string& filePath, bool initParametersFromState);