Add handlers for control messages and callbacks

This commit is contained in:
Robbert van der Helm
2020-12-04 14:06:16 +01:00
parent e889ad22e2
commit 2e9b100090
4 changed files with 21 additions and 0 deletions
+5
View File
@@ -37,4 +37,9 @@ Vst3PluginBridge::Vst3PluginBridge()
// This will block until all sockets have been connected to by the Wine VST
// host
connect_sockets_guarded();
host_callback_handler = std::jthread([&]() {
// TODO: Handle callbacks
// sockets.vst_host_callback.receive_multi();
});
}
+6
View File
@@ -52,6 +52,12 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
Vst3PluginBridge();
private:
/**
* Handles callbacks from the plugin to the host over the
* `vst_host_callback` sockets.
*/
std::jthread host_callback_handler;
/**
* The logging facility used for this instance of yabridge. Wraps around
* `PluginBridge::generic_logger`.
+5
View File
@@ -47,6 +47,11 @@ Vst3Bridge::Vst3Bridge(MainContext& main_context,
// TODO: We should send a copy of the configuration from the plugin at this
// point config = sockets.host_vst_control.receive_single<Configuration>();
control_handler = Win32Thread([&]() {
// TODO: Handle control messages
// sockets.host_vst_control.receive_multi();
});
}
void Vst3Bridge::run() {
+5
View File
@@ -79,4 +79,9 @@ class Vst3Bridge : public HostBridge {
* threads to exit.
*/
Vst3Sockets<Win32Thread> sockets;
/**
* Handles control messages host over the `hsot_vst_control` sockets.
*/
Win32Thread control_handler;
};