mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Move the flush request to the audio thread
This commit is contained in:
+10
-11
@@ -179,17 +179,6 @@ ClapPluginBridge::ClapPluginBridge(const ghc::filesystem::path& plugin_path)
|
||||
|
||||
return Ack{};
|
||||
},
|
||||
[&](const clap::ext::params::host::RequestFlush& request)
|
||||
-> clap::ext::params::host::RequestFlush::Response {
|
||||
const auto& [plugin_proxy, _] =
|
||||
get_proxy(request.owner_instance_id);
|
||||
|
||||
// This doesn't need to be called from the main thread
|
||||
plugin_proxy.host_extensions_.params->request_flush(
|
||||
plugin_proxy.host_);
|
||||
|
||||
return Ack{};
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -277,6 +266,16 @@ void ClapPluginBridge::register_plugin_proxy(
|
||||
// hell. I haven't been able to figure out why.
|
||||
return {};
|
||||
},
|
||||
[&](const clap::ext::params::host::RequestFlush& request)
|
||||
-> clap::ext::params::host::RequestFlush::Response {
|
||||
const auto& [plugin_proxy, _] =
|
||||
get_proxy(request.owner_instance_id);
|
||||
|
||||
plugin_proxy.host_extensions_.params->request_flush(
|
||||
plugin_proxy.host_);
|
||||
|
||||
return Ack{};
|
||||
},
|
||||
[&](const clap::ext::tail::host::Changed& request)
|
||||
-> clap::ext::tail::host::Changed::Response {
|
||||
// FIXME:
|
||||
|
||||
@@ -116,8 +116,8 @@ class ClapPluginBridge : PluginBridge<ClapSockets<std::jthread>> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an a message to a plugin instance's audio thread. This is separate
|
||||
* from `send_message()`, which shares one socket for all plugin instances.
|
||||
* Send a message to a plugin instance's audio thread. This is separate from
|
||||
* `send_message()`, which shares one socket for all plugin instances.
|
||||
*/
|
||||
template <typename T>
|
||||
typename T::Response send_audio_thread_message(const T& object) {
|
||||
|
||||
Reference in New Issue
Block a user