mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Also use mutual recursion for program list changes
The VST3 version of Voxengo TEOTE would deadlock in Ardour when Ardour calls `IEditController::setState()`, the plugin calls `IUnitHandler::notifyProgramListChange()` in response, and then when Ardour calls `IUnitInfo::getProgramName()` while handling that callback. All of these functions have to be called from the same thread in Voxengo plugins.
This commit is contained in:
@@ -175,10 +175,14 @@ tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitSelection(
|
||||
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyProgramListChange(
|
||||
Steinberg::Vst::ProgramListID listId,
|
||||
int32 programIndex) {
|
||||
return bridge.send_message(YaUnitHandler::NotifyProgramListChange{
|
||||
.owner_instance_id = owner_instance_id(),
|
||||
.list_id = listId,
|
||||
.program_index = programIndex});
|
||||
// NOTE: When a plugin calls this, Ardour will fetch the new program names
|
||||
// with `IUnitInfo::getProgramName()`. TEOTE requires this to be
|
||||
// called from the same thread.
|
||||
return bridge.send_mutually_recursive_message(
|
||||
YaUnitHandler::NotifyProgramListChange{
|
||||
.owner_instance_id = owner_instance_id(),
|
||||
.list_id = listId,
|
||||
.program_index = programIndex});
|
||||
}
|
||||
|
||||
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitByBusChange() {
|
||||
|
||||
Reference in New Issue
Block a user