mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Always honor CLAP main thread requirement
If this ever becomes a bottleneck we can always decide to not do it right there and then.
This commit is contained in:
@@ -88,12 +88,16 @@ ClapPluginBridge::ClapPluginBridge(const ghc::filesystem::path& plugin_path)
|
||||
const auto& [plugin_proxy, _] =
|
||||
get_proxy(request.owner_instance_id);
|
||||
|
||||
// We'll ignore the main thread requirement for
|
||||
// simple lookup functions like this for
|
||||
// performance's sake
|
||||
return plugin_proxy.extensions_.audio_ports
|
||||
->is_rescan_flag_supported(plugin_proxy.host_,
|
||||
request.flag);
|
||||
return plugin_proxy
|
||||
.run_on_main_thread(
|
||||
[&, host = plugin_proxy.host_,
|
||||
audio_ports = plugin_proxy.extensions_
|
||||
.audio_ports]() {
|
||||
return audio_ports
|
||||
->is_rescan_flag_supported(
|
||||
host, request.flag);
|
||||
})
|
||||
.get();
|
||||
},
|
||||
[&](const clap::ext::audio_ports::host::Rescan& request)
|
||||
-> clap::ext::audio_ports::host::Rescan::Response {
|
||||
|
||||
Reference in New Issue
Block a user