Fix EventsSortByTimeAndType (type/event-type API mismatch)
Correct use would be `parameter_is_midi (midi_parameter_type (ev->type()))` However that only checks for control params. Note events are excluded.
This commit is contained in:
parent
b67b18483c
commit
c457dd2eac
@ -95,13 +95,13 @@ template<typename Time>
|
||||
struct EventsSortByTimeAndType {
|
||||
bool operator() (const Evoral::Event<Time>* a, const Evoral::Event<Time>* b) {
|
||||
if (a->time() == b->time()) {
|
||||
if (parameter_is_midi ((AutomationType)a->event_type()) &&
|
||||
parameter_is_midi ((AutomationType)b->event_type())) {
|
||||
if (a->is_midi () && b->is_midi ()) {
|
||||
/* negate return value since we must return whether
|
||||
* or not a should sort before b, not b before a
|
||||
*/
|
||||
return !MidiBuffer::second_simultaneous_midi_byte_is_first (a->buffer()[0], b->buffer()[0]);
|
||||
}
|
||||
return a->type () < b->type ();
|
||||
}
|
||||
return a->time() < b->time();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user