Reload supported interfaces after IPluginBase::initialize()

This is needed as a workaround to support Waves VST3 plugins.

Right now does does not actually fix the issue because the arguments are
not updated in the subclasses. The next commit will fix this.
This commit is contained in:
Robbert van der Helm
2021-07-05 16:03:39 +02:00
parent 3fbb01f225
commit 1397400155
8 changed files with 119 additions and 48 deletions
@@ -63,28 +63,9 @@ class YaPluginBase : public Steinberg::IPluginBase {
inline bool supported() const noexcept { return arguments.supported; }
/**
* Message to pass through a call to `IPluginBase::initialize()` to the Wine
* plugin host. We will read what interfaces the passed context object
* implements so we can then create a proxy object on the Wine side that the
* plugin can use to make callbacks with. The lifetime of this
* `Vst3HostContextProxy` object should be bound to the `IComponent` we are
* proxying.
*/
struct Initialize {
using Response = UniversalTResult;
native_size_t instance_id;
Vst3HostContextProxy::ConstructArgs host_context_args;
template <typename S>
void serialize(S& s) {
s.value8b(instance_id);
s.object(host_context_args);
}
};
// The request and response for `IPluginBase::initialize()` is defined
// within `Vst3PluginProxy` because it (thanks to Waves) requires all
// supported interfaces to be queried again
virtual tresult PLUGIN_API initialize(FUnknown* context) override = 0;
/**