Handle connection point proxy from GUI thread

FabFilter plugins will exchange messages that have to be handled from
the GUI thread, or they'll get stuck waiting on a synchronisation
object. This probably hurts GUI performance significantly but luckily it
only affects Ardour.
This commit is contained in:
Robbert van der Helm
2021-01-24 15:42:25 +01:00
parent 77414c80d6
commit 21ff906bf8
2 changed files with 16 additions and 4 deletions
@@ -52,7 +52,11 @@ Vst3ConnectionPointProxyImpl::disconnect(IConnectionPoint* /*other*/) {
tresult PLUGIN_API
Vst3ConnectionPointProxyImpl::notify(Steinberg::Vst::IMessage* message) {
if (message) {
return bridge.send_message(
// FabFilter plugins require this to be done from the GUI thread so we
// need to use our mutual recursion mechanism. Luckily only Ardour uses
// connection proxies, so if this ends up breaking something it will
// only affect Ardour.
return bridge.send_mutually_recursive_message(
YaConnectionPoint::Notify{.instance_id = owner_instance_id(),
.message_ptr = YaMessagePtr(*message)});
} else {