Retain order of concurrent MIDI events

This fixes an issue with FaderPort8 (and maybe other surfaces or synths).
This commit is contained in:
Robin Gareus 2017-04-08 23:43:50 +02:00
parent d4f2121cfa
commit f9db9bf5fd
4 changed files with 4 additions and 4 deletions

View file

@ -2142,7 +2142,7 @@ void* CoreMidiPort::get_buffer (pframes_t /* nframes */)
(_buffer[_bufperiod]).push_back (boost::shared_ptr<CoreMidiEvent>(new CoreMidiEvent (**it)));
}
}
std::sort ((_buffer[_bufperiod]).begin (), (_buffer[_bufperiod]).end (), MidiEventSorter());
std::stable_sort ((_buffer[_bufperiod]).begin (), (_buffer[_bufperiod]).end (), MidiEventSorter());
}
return &(_buffer[_bufperiod]);