mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +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::Response {
|
||||
return object_instances[request.instance_id]
|
||||
.info_listener->setChannelContextInfos(&request.list);
|
||||
// Melodyne wants to immediately update the GUI upon receiving
|
||||
// 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)
|
||||
-> YaKeyswitchController::GetKeyswitchCount::Response {
|
||||
|
||||
Reference in New Issue
Block a user