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

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