mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 13:40:05 +02:00
Request/send config for VST3 plugins
Using the new Vst3MessageHandler.
This commit is contained in:
@@ -78,7 +78,10 @@ class HostBridge {
|
||||
* Wine window, and embedding that Wine window into a window provided by the
|
||||
* host. Should be empty when the editor is not open.
|
||||
*
|
||||
* @see should_postpone_message_loop
|
||||
* TODO: This should be moved back to `Vst2Bridge`, `handle_x11_events()``
|
||||
* and `handle_win32_events()` should be made pure virtual. A single
|
||||
* `Vst3Bridge` instance will handle multiple plugin instances because
|
||||
* of the way VST3 works.
|
||||
*/
|
||||
std::optional<Editor> editor;
|
||||
};
|
||||
|
||||
@@ -63,6 +63,10 @@ class Vst2Bridge : public HostBridge {
|
||||
std::string plugin_dll_path,
|
||||
std::string endpoint_base_dir);
|
||||
|
||||
/**
|
||||
* Here we'll handle incoming `dispatch()` messages until the sockets get
|
||||
* closed during `effClose()`.
|
||||
*/
|
||||
void run() override;
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,16 +45,17 @@ Vst3Bridge::Vst3Bridge(MainContext& main_context,
|
||||
|
||||
sockets.connect();
|
||||
|
||||
// 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();
|
||||
});
|
||||
// Fetch this instance's configuration from the plugin to finish the setup
|
||||
// process
|
||||
config = sockets.vst_host_callback.send_message(WantsConfiguration{},
|
||||
std::nullopt);
|
||||
}
|
||||
|
||||
void Vst3Bridge::run() {
|
||||
// TODO: Do something
|
||||
// TODO: Handle events
|
||||
// sockets.host_vst_control.receive_messages(
|
||||
// std::nullopt, [&](ControlRequest request) -> ControlResponse {
|
||||
// });
|
||||
|
||||
std::cerr << "TODO: Not yet implemented" << std::endl;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,10 @@ class Vst3Bridge : public HostBridge {
|
||||
std::string plugin_dll_path,
|
||||
std::string endpoint_base_dir);
|
||||
|
||||
/**
|
||||
* Here we'll listen for and handle incoming control messages until the
|
||||
* sockets get closed.
|
||||
*/
|
||||
void run() override;
|
||||
|
||||
private:
|
||||
@@ -79,9 +83,4 @@ class Vst3Bridge : public HostBridge {
|
||||
* threads to exit.
|
||||
*/
|
||||
Vst3Sockets<Win32Thread> sockets;
|
||||
|
||||
/**
|
||||
* Handles control messages host over the `hsot_vst_control` sockets.
|
||||
*/
|
||||
Win32Thread control_handler;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user