diff --git a/src/plugin/bridges/vst3.cpp b/src/plugin/bridges/vst3.cpp index 5b00d0cd..5039126c 100644 --- a/src/plugin/bridges/vst3.cpp +++ b/src/plugin/bridges/vst3.cpp @@ -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(); + }); } diff --git a/src/plugin/bridges/vst3.h b/src/plugin/bridges/vst3.h index b1083304..f997a11d 100644 --- a/src/plugin/bridges/vst3.h +++ b/src/plugin/bridges/vst3.h @@ -52,6 +52,12 @@ class Vst3PluginBridge : PluginBridge> { 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`. diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index 700a46d0..71ad6bce 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -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(); + + control_handler = Win32Thread([&]() { + // TODO: Handle control messages + // sockets.host_vst_control.receive_multi(); + }); } void Vst3Bridge::run() { diff --git a/src/wine-host/bridges/vst3.h b/src/wine-host/bridges/vst3.h index 45ca30a6..9dbb4be0 100644 --- a/src/wine-host/bridges/vst3.h +++ b/src/wine-host/bridges/vst3.h @@ -79,4 +79,9 @@ class Vst3Bridge : public HostBridge { * threads to exit. */ Vst3Sockets sockets; + + /** + * Handles control messages host over the `hsot_vst_control` sockets. + */ + Win32Thread control_handler; };