Flush the bus info cache in more places

The current approach 'works', but better err on the safe side. Once this
caching layer is no longer necessary we should just remove it.
This commit is contained in:
Robbert van der Helm
2021-01-30 13:48:42 +01:00
parent 0adca3e33c
commit 68e10cd24c
3 changed files with 41 additions and 17 deletions
+9 -3
View File
@@ -85,9 +85,15 @@ Vst3PluginBridge::Vst3PluginBridge()
},
[&](const YaComponentHandler::RestartComponent& request)
-> YaComponentHandler::RestartComponent::Response {
return plugin_proxies.at(request.owner_instance_id)
.get()
.component_handler->restartComponent(request.flags);
Vst3PluginProxyImpl& proxy_object =
plugin_proxies.at(request.owner_instance_id).get();
// To err on the safe side, we'll just always clear out bus
// info cache whenever a plugin requests a restart
proxy_object.clear_bus_cache();
return proxy_object.component_handler->restartComponent(
request.flags);
},
[&](const YaComponentHandler2::SetDirty& request)
-> YaComponentHandler2::SetDirty::Response {