mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Refactor event receiving to optimize MIDI handlign
This keeps compatibility with some weirdly designed plugins (such as Kontakt) while avoiding some unnecessary data transformations. Before this we'd convert from a `DynamicVstEvents` object to a `VstEvents` object, back to a `DynamicVstEvents` and then finally back into another `VstEvents` object. With this change we can skip the second half of the conversions.
This commit is contained in:
@@ -172,9 +172,9 @@ HostBridge::HostBridge(audioMasterCallback host_callback)
|
||||
host_callback_handler = std::thread([&]() {
|
||||
try {
|
||||
while (true) {
|
||||
passthrough_event(vst_host_callback,
|
||||
std::pair<Logger&, bool>(logger, false),
|
||||
&plugin, host_callback_function);
|
||||
receive_event(
|
||||
vst_host_callback, std::pair<Logger&, bool>(logger, false),
|
||||
passthrough_event(&plugin, host_callback_function));
|
||||
}
|
||||
} catch (const boost::system::system_error&) {
|
||||
// This happens when the sockets got closed because the plugin
|
||||
|
||||
Reference in New Issue
Block a user