mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 20:40:03 +02:00
Fix performEdit() deadlock in Ardour/Mixbus
Those DAWs would immediately call `IEditController::performEdit()` with the same parameter change the plugin has just announced, which would result in a deadlock. Hopefully this helps with #100.
This commit is contained in:
@@ -440,9 +440,16 @@ void Vst3Bridge::run() {
|
||||
},
|
||||
[&](const YaEditController::SetParamNormalized& request)
|
||||
-> YaEditController::SetParamNormalized::Response {
|
||||
return object_instances[request.instance_id]
|
||||
.edit_controller->setParamNormalized(request.id,
|
||||
request.value);
|
||||
// HACK: Under Ardour/Mixbus, `IComponentHandler::performEdit()`
|
||||
// and `IEditController::setParamNormalized()` can be
|
||||
// mutually recursive because the host will immediately
|
||||
// relay the parameter change the plugin has just
|
||||
// announced.
|
||||
return do_mutual_recursion_on_off_thread<tresult>([&]() {
|
||||
return object_instances[request.instance_id]
|
||||
.edit_controller->setParamNormalized(request.id,
|
||||
request.value);
|
||||
});
|
||||
},
|
||||
[&](YaEditController::SetComponentHandler& request)
|
||||
-> YaEditController::SetComponentHandler::Response {
|
||||
|
||||
Reference in New Issue
Block a user