mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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:
@@ -71,6 +71,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
- Fixed _FabFilter_ VST3 plugins freezing in **Ardour** and **Mixbus** when
|
- Fixed _FabFilter_ VST3 plugins freezing in **Ardour** and **Mixbus** when
|
||||||
trying to duplicate existing instances of the plugin while the GUI editor is
|
trying to duplicate existing instances of the plugin while the GUI editor is
|
||||||
open.
|
open.
|
||||||
|
- Fixed VST3 plugins freezing in **Ardour** and **Mixbus** when the plugin tries
|
||||||
|
to automate a parameter while loading a preset.
|
||||||
- Fixed a regression from yabridge 3.1.0 where REAPER would freeze when opening
|
- Fixed a regression from yabridge 3.1.0 where REAPER would freeze when opening
|
||||||
a VST3 plugin context menu.
|
a VST3 plugin context menu.
|
||||||
- Fixed a potential assertion failure when setting VST3 preset data. This would
|
- Fixed a potential assertion failure when setting VST3 preset data. This would
|
||||||
|
|||||||
@@ -47,7 +47,12 @@ Vst3ComponentHandlerProxyImpl::beginEdit(Steinberg::Vst::ParamID id) {
|
|||||||
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::performEdit(
|
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::performEdit(
|
||||||
Steinberg::Vst::ParamID id,
|
Steinberg::Vst::ParamID id,
|
||||||
Steinberg::Vst::ParamValue valueNormalized) {
|
Steinberg::Vst::ParamValue valueNormalized) {
|
||||||
return bridge.send_message(YaComponentHandler::PerformEdit{
|
// HACK: Ardour/Mixbus will in some cases immediately call
|
||||||
|
// `IEditController::setParamNormalized()` after this `performEdit()`,
|
||||||
|
// so we need to be able to receive that
|
||||||
|
// `IEditController::setParamNormalized()` on the same thread.
|
||||||
|
return bridge.send_mutually_recursive_message(
|
||||||
|
YaComponentHandler::PerformEdit{
|
||||||
.owner_instance_id = owner_instance_id(),
|
.owner_instance_id = owner_instance_id(),
|
||||||
.id = id,
|
.id = id,
|
||||||
.value_normalized = valueNormalized});
|
.value_normalized = valueNormalized});
|
||||||
|
|||||||
@@ -440,9 +440,16 @@ void Vst3Bridge::run() {
|
|||||||
},
|
},
|
||||||
[&](const YaEditController::SetParamNormalized& request)
|
[&](const YaEditController::SetParamNormalized& request)
|
||||||
-> YaEditController::SetParamNormalized::Response {
|
-> YaEditController::SetParamNormalized::Response {
|
||||||
|
// 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]
|
return object_instances[request.instance_id]
|
||||||
.edit_controller->setParamNormalized(request.id,
|
.edit_controller->setParamNormalized(request.id,
|
||||||
request.value);
|
request.value);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
[&](YaEditController::SetComponentHandler& request)
|
[&](YaEditController::SetComponentHandler& request)
|
||||||
-> YaEditController::SetComponentHandler::Response {
|
-> YaEditController::SetComponentHandler::Response {
|
||||||
|
|||||||
Reference in New Issue
Block a user