mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Handle incoming events from off-threads separately
On the Wine side we want to handle most events on the main UI thread. We'll assume any events coming in from a secondary socket are safe and can be handled directly.
This commit is contained in:
@@ -121,10 +121,9 @@ PluginBridge::PluginBridge(audioMasterCallback host_callback)
|
||||
// instead of asynchronous IO since communication has to be handled in
|
||||
// lockstep anyway
|
||||
host_callback_handler = std::jthread([&]() {
|
||||
// TODO: Think of a nicer way to structure this and the similar
|
||||
// handler in `Vst2Bridge::handle_dispatch_midi_events`
|
||||
sockets.vst_host_callback.receive(
|
||||
std::pair<Logger&, bool>(logger, false), [&](Event& event) {
|
||||
std::pair<Logger&, bool>(logger, false),
|
||||
[&](Event& event, bool /*on_main_thread*/) {
|
||||
// MIDI events sent from the plugin back to the host are a
|
||||
// special case here. They have to sent during the
|
||||
// `processReplacing()` function or else the host will ignore
|
||||
|
||||
Reference in New Issue
Block a user