From dd74e548546df2609c7c89d915235ed2f29d9761 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 28 Dec 2020 00:38:35 +0100 Subject: [PATCH] Add FIXME for a crazy design issue in VocalSynth 2 They're exchanging pointers between the processor and the controller using messages. And not only that, they're storing the message objects instead of storing the pointers. --- src/wine-host/bridges/vst3.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index fe2f427f..a308c4b9 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -225,6 +225,17 @@ void Vst3Bridge::run() { }, [&](YaConnectionPoint::Notify& request) -> YaConnectionPoint::Notify::Response { + // FIXME: This needs to be redesigned. We should only send a + // pointer to the `IMessage` instead of copying the + // actual message. What ends up happening is that iZotope + // VocalSynth 2 exchanges pointers to the processor and + // the controller. Then at some point during an + // `IAudioProcessor::process()` call after a parameter + // changes, it will try to access the pointers stored in + // that message. So to be able to support that, the + // message object we pass to notify here still has to be + // alive at that point. This goes 100% against the design + // of VST3, but there's nothing we can do about it. return object_instances[request.instance_id] .connection_point->notify(&request.message); },