mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
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.
This commit is contained in:
@@ -205,7 +205,7 @@ class Vst2PluginBridge : PluginBridge<Vst2Sockets<std::jthread>> {
|
||||
* we receive so we can send them to host on the audio thread at the end of
|
||||
* `process_replacing()`.
|
||||
*/
|
||||
boost::container::small_vector<DynamicVstEvents, 4> incoming_midi_events;
|
||||
boost::container::small_vector<DynamicVstEvents, 1> incoming_midi_events;
|
||||
/**
|
||||
* Mutex for locking the above event queue, since recieving and processing
|
||||
* now happens in two different threads.
|
||||
|
||||
@@ -201,7 +201,7 @@ class Vst2Bridge : public HostBridge {
|
||||
* practice every host will bundle all events in a single
|
||||
* `effProcessEvents()` call.
|
||||
*/
|
||||
boost::container::small_vector<DynamicVstEvents, 4>
|
||||
boost::container::small_vector<DynamicVstEvents, 1>
|
||||
next_audio_buffer_midi_events;
|
||||
/**
|
||||
* Whether `next_audio_buffer_midi_events` should be cleared before
|
||||
|
||||
Reference in New Issue
Block a user