mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 04:50:43 +02:00
Use the new approach for creating plugin factory
Directly serializing and deserializing into objects was and more boilerplate heavy (since we now need two implementations even though we only use one), and also much less flexible because we can't wrap payloads in structs or provide optional values that way.
This commit is contained in:
@@ -52,17 +52,6 @@ struct WantsConfiguration {
|
||||
void serialize(S&) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* Marker struct to indicate the other side (the Wine plugin host) should send a
|
||||
* copy of the hosted Windows VST3 plugin's `IPluginFactory{,2,3}` interface.
|
||||
*/
|
||||
struct WantsPluginFactory {
|
||||
using Response = YaPluginFactory&;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S&) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* When we send a control message from the plugin to the Wine VST host, this
|
||||
* encodes the information we request or the operation we want to perform. A
|
||||
@@ -71,7 +60,7 @@ struct WantsPluginFactory {
|
||||
using ControlRequest = std::variant<YaComponent::Construct,
|
||||
YaComponent::Destruct,
|
||||
YaComponent::Terminate,
|
||||
WantsPluginFactory>;
|
||||
YaPluginFactory::Construct>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, ControlRequest& payload) {
|
||||
|
||||
Reference in New Issue
Block a user