mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Add handlers for control messages and callbacks
This commit is contained in:
@@ -37,4 +37,9 @@ Vst3PluginBridge::Vst3PluginBridge()
|
|||||||
// This will block until all sockets have been connected to by the Wine VST
|
// This will block until all sockets have been connected to by the Wine VST
|
||||||
// host
|
// host
|
||||||
connect_sockets_guarded();
|
connect_sockets_guarded();
|
||||||
|
|
||||||
|
host_callback_handler = std::jthread([&]() {
|
||||||
|
// TODO: Handle callbacks
|
||||||
|
// sockets.vst_host_callback.receive_multi();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,12 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
|||||||
Vst3PluginBridge();
|
Vst3PluginBridge();
|
||||||
|
|
||||||
private:
|
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
|
* The logging facility used for this instance of yabridge. Wraps around
|
||||||
* `PluginBridge::generic_logger`.
|
* `PluginBridge::generic_logger`.
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ Vst3Bridge::Vst3Bridge(MainContext& main_context,
|
|||||||
|
|
||||||
// TODO: We should send a copy of the configuration from the plugin at this
|
// TODO: We should send a copy of the configuration from the plugin at this
|
||||||
// point config = sockets.host_vst_control.receive_single<Configuration>();
|
// 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() {
|
void Vst3Bridge::run() {
|
||||||
|
|||||||
@@ -79,4 +79,9 @@ class Vst3Bridge : public HostBridge {
|
|||||||
* threads to exit.
|
* threads to exit.
|
||||||
*/
|
*/
|
||||||
Vst3Sockets<Win32Thread> sockets;
|
Vst3Sockets<Win32Thread> sockets;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles control messages host over the `hsot_vst_control` sockets.
|
||||||
|
*/
|
||||||
|
Win32Thread control_handler;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user