Move the flush request to the audio thread

This commit is contained in:
Robbert van der Helm
2022-09-26 16:46:00 +02:00
parent 214ba51010
commit 8bc61837c9
5 changed files with 17 additions and 22 deletions
+10 -11
View File
@@ -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:
+2 -2
View File
@@ -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) {