mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Handle mutual recursion while loading presets
This commit is contained in:
@@ -81,6 +81,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
- Fixed the VST3 version of _W. A. Production ImPerfect_ from crashing during
|
||||
audio setup.
|
||||
- Fixed _UVI Plugsound Free_ crashing during initialization.
|
||||
- Fixed a rare potential freeze when loading a VST3 plugin preset while the
|
||||
plugin is being resized.
|
||||
- Because of the new transport information prefetching, the excessive DSP usage
|
||||
in _SWAM Cello_ is now been fixed without requiring any manual compatibility
|
||||
options.
|
||||
|
||||
@@ -234,20 +234,20 @@ void Vst3Bridge::run() {
|
||||
-> Vst3PluginProxy::SetState::Response {
|
||||
// We need to run `getState()` from the main thread, so we might
|
||||
// as well do the same thing with `setState()`. See below.
|
||||
return main_context
|
||||
.run_in_context<tresult>([&]() {
|
||||
// This same function is defined in both `IComponent`
|
||||
// and `IEditController`, so the host is calling one or
|
||||
// the other
|
||||
if (object_instances[request.instance_id].component) {
|
||||
return object_instances[request.instance_id]
|
||||
.component->setState(&request.state);
|
||||
} else {
|
||||
return object_instances[request.instance_id]
|
||||
.edit_controller->setState(&request.state);
|
||||
}
|
||||
})
|
||||
.get();
|
||||
// NOTE: We also try to handle mutual recursion here, in case
|
||||
// this happens during a resize
|
||||
return do_mutual_recursion_on_gui_thread<tresult>([&]() {
|
||||
// This same function is defined in both `IComponent` and
|
||||
// `IEditController`, so the host is calling one or the
|
||||
// other
|
||||
if (object_instances[request.instance_id].component) {
|
||||
return object_instances[request.instance_id]
|
||||
.component->setState(&request.state);
|
||||
} else {
|
||||
return object_instances[request.instance_id]
|
||||
.edit_controller->setState(&request.state);
|
||||
}
|
||||
});
|
||||
},
|
||||
[&](Vst3PluginProxy::GetState& request)
|
||||
-> Vst3PluginProxy::GetState::Response {
|
||||
|
||||
Reference in New Issue
Block a user