1
0
Fork 0

Remove now unnecessary input events sort

This was added in anticipation of having to merge the parameter change
MIDI CC events into the events stream, but VST3 threw a curveball and
now we need to do the sorting one step earlier.
This commit is contained in:
Robbert van der Helm 2022-04-09 11:32:05 +02:00
parent 52d7b47a24
commit f0303fed4b

View file

@ -299,15 +299,6 @@ impl<P: Vst3Plugin> WrapperInner<P> {
}
pub fn make_process_context(&self, transport: Transport) -> WrapperProcessContext<'_, P> {
// NOTE: Because with VST3 MIDI CC messages are sent as parameter changes and VST3 does not
// interleave parameter changes and note events, this queue has to be sorted when
// creating the process context. This is quite a waste of resources, but there's no
// way around it.
let mut input_events = self.input_events.borrow_mut();
input_events
.make_contiguous()
.sort_by_key(|event| event.timing());
WrapperProcessContext {
inner: self,
input_events_guard: input_events,