Send the configuration from plugin to Wine host

Next we can add some options for different plugin editor behaviours for #27.
This commit is contained in:
Robbert van der Helm
2020-07-22 17:15:20 +02:00
parent 44044324f3
commit cd02ab5fc9
4 changed files with 28 additions and 3 deletions
+4
View File
@@ -134,6 +134,10 @@ Vst2Bridge::Vst2Bridge(boost::asio::io_context& main_context,
// `audioMasterIOChanged()`.
write_object(host_vst_control, EventResult{0, *plugin, std::nullopt});
// After sending the AEffect struct we'll receive this instance's
// configuration as a response
config = read_object<Configuration>(host_vst_control);
// This works functionally identically to the `handle_dispatch()` function,
// but this socket will only handle MIDI events and it will handle them
// eagerly. This is needed because of Win32 API limitations.
+8
View File
@@ -29,6 +29,7 @@
#include <boost/asio/local/stream_protocol.hpp>
#include <mutex>
#include "../../common/configuration.h"
#include "../../common/logging.h"
#include "../editor.h"
#include "../utils.h"
@@ -167,6 +168,13 @@ class Vst2Bridge {
*/
boost::asio::io_context& io_context;
/**
* The configuration for this instance of yabridge based on the `.so` file
* that got loaded by the host. This configuration gets loaded on the plugin
* side, and then sent over to the Wine host as part of the startup process.
*/
Configuration config;
/**
* The shared library handle of the VST plugin. I sadly could not get
* Boost.DLL to work here, so we'll just load the VST plugisn by hand.