mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-16 16:33:55 +02:00
Create Vst3HostContextProxy from YaHostApplication
This is quite a huge refactor, but note everything is consistent (and we're going to need one or two more of these `Vst3*Proxy` objects). Right now nothing extends `IHostApplication`, but this way it will be trivial to add support for more host context interfaces.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../bitsery/ext/vst3.h"
|
||||
#include "base.h"
|
||||
#include "host-application.h"
|
||||
#include "host-context-proxy.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
@@ -155,20 +155,22 @@ class YaPluginFactory : public Steinberg::IPluginFactory3 {
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPluginFactory3::setHostContext()` to
|
||||
* the Wine plugin host. A proxy `YaHostApplication` should be created on
|
||||
* the Wine plugin host and then passed as an argument to
|
||||
* `IPluginFactory3::setHostContext()`. If the host called
|
||||
* `IPluginFactory3::setHostContext()` with something other than an
|
||||
* `IHostApplication*`, we return an error immediately and log the call.
|
||||
* the Wine plugin host. A `Vst3HostContextProxy` should be created on the
|
||||
* Wine plugin host and then passed as an argument to
|
||||
* `IPluginFactory3::setHostContext()`.
|
||||
*/
|
||||
struct SetHostContext {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
YaHostApplication::ConstructArgs host_application_context_args;
|
||||
/**
|
||||
* Arguments for creating a proxy host context object. If we got passed
|
||||
* an null pointer we'll reflect that.
|
||||
*/
|
||||
std::optional<Vst3HostContextProxy::ConstructArgs> host_context_args;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.object(host_application_context_args);
|
||||
s.ext(host_context_args, bitsery::ext::StdOptional{});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user