mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 04:19:59 +02:00
Rework Vst3MessageHandler::receive_messages
This now takes a regular overloaded function and the visiting is done in `receive_messages()` itself. This way we can use templates to ensure that the return type is correct. Otherwise auto will cause issues in the future when we want to return multiple concrete types from a function that takes a single variant. The alternative would be both receiving a variant as a parameter and then returning another variant as a result, but that is much less type safe.
This commit is contained in:
@@ -58,7 +58,7 @@ struct WantsPluginFactory {
|
||||
/**
|
||||
* 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
|
||||
* request of type `ControlRequest(T)` should send back a `T::Reponse`.
|
||||
* request of type `ControlRequest(T)` should send back a `T::Response`.
|
||||
*/
|
||||
using ControlRequest = std::variant<WantsPluginFactory>;
|
||||
|
||||
@@ -70,7 +70,7 @@ void serialize(S& s, ControlRequest& payload) {
|
||||
/**
|
||||
* When we do a callback from the Wine VST host to the plugin, this encodes the
|
||||
* information we want or the operation we want to perform. A request of type
|
||||
* `CallbackRequest(T)` should send back a `T::Reponse`.
|
||||
* `CallbackRequest(T)` should send back a `T::Response`.
|
||||
*/
|
||||
using CallbackRequest = std::variant<WantsConfiguration>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user