From 53d59f74d1fbf479d19492f4e75cef62ab94e69f Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 10 Jun 2021 12:43:54 +0200 Subject: [PATCH] Reduce the VST2 events small vector capacities Every DAW will just send all events in one go (and I think that's the only way you should do it, but the VST2 spec is a bit leaky so who knows). It wouldn't make much sense to preallocate more capacity, because when DAWs do send all of those events individually they might end up sending more than four of these anyways. --- src/plugin/bridges/vst2.h | 2 +- src/wine-host/bridges/vst2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin/bridges/vst2.h b/src/plugin/bridges/vst2.h index 63d34974..f6264084 100644 --- a/src/plugin/bridges/vst2.h +++ b/src/plugin/bridges/vst2.h @@ -205,7 +205,7 @@ class Vst2PluginBridge : PluginBridge> { * we receive so we can send them to host on the audio thread at the end of * `process_replacing()`. */ - boost::container::small_vector incoming_midi_events; + boost::container::small_vector incoming_midi_events; /** * Mutex for locking the above event queue, since recieving and processing * now happens in two different threads. diff --git a/src/wine-host/bridges/vst2.h b/src/wine-host/bridges/vst2.h index d52fe75b..d7656c2e 100644 --- a/src/wine-host/bridges/vst2.h +++ b/src/wine-host/bridges/vst2.h @@ -201,7 +201,7 @@ class Vst2Bridge : public HostBridge { * practice every host will bundle all events in a single * `effProcessEvents()` call. */ - boost::container::small_vector + boost::container::small_vector next_audio_buffer_midi_events; /** * Whether `next_audio_buffer_midi_events` should be cleared before