mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-21 03:13:56 +02:00
Pass channel context data from the GUI thread
This fixes Melodyne crashing as it presumably immediately wants to redraw upon receiving this.
This commit is contained in:
@@ -433,8 +433,16 @@ void Vst3Bridge::run() {
|
|||||||
},
|
},
|
||||||
[&](YaInfoListener::SetChannelContextInfos& request)
|
[&](YaInfoListener::SetChannelContextInfos& request)
|
||||||
-> YaInfoListener::SetChannelContextInfos::Response {
|
-> YaInfoListener::SetChannelContextInfos::Response {
|
||||||
return object_instances[request.instance_id]
|
// Melodyne wants to immediately update the GUI upon receiving
|
||||||
.info_listener->setChannelContextInfos(&request.list);
|
// certain channel context data, so this has to be run from the
|
||||||
|
// main thread
|
||||||
|
return main_context
|
||||||
|
.run_in_context<tresult>([&]() {
|
||||||
|
return object_instances[request.instance_id]
|
||||||
|
.info_listener->setChannelContextInfos(
|
||||||
|
&request.list);
|
||||||
|
})
|
||||||
|
.get();
|
||||||
},
|
},
|
||||||
[&](const YaKeyswitchController::GetKeyswitchCount& request)
|
[&](const YaKeyswitchController::GetKeyswitchCount& request)
|
||||||
-> YaKeyswitchController::GetKeyswitchCount::Response {
|
-> YaKeyswitchController::GetKeyswitchCount::Response {
|
||||||
|
|||||||
Reference in New Issue
Block a user