From 92ea15bcb49b35646bc118691ca0640da931b8f4 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 8 Dec 2020 23:01:50 +0100 Subject: [PATCH] Allow interface implementations to send messages --- src/plugin/bridges/vst3.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugin/bridges/vst3.h b/src/plugin/bridges/vst3.h index 1d6d6d69..944f4bb8 100644 --- a/src/plugin/bridges/vst3.h +++ b/src/plugin/bridges/vst3.h @@ -63,6 +63,17 @@ class Vst3PluginBridge : PluginBridge> { */ Steinberg::IPluginFactory* get_plugin_factory(); + /** + * Send a control message to the Wine plugin host return the response. This + * is a shorthand for `sockets.host_vst_control.send_message` for use in + * VST3 interface implementations. + */ + template + typename T::Response send_message(const T& object) { + return sockets.host_vst_control.send_message( + object, std::pair(logger, true)); + } + /** * The logging facility used for this instance of yabridge. Wraps around * `PluginBridge::generic_logger`.