For nearly coincident note-on the sequence does not matter,
but note-off must be sent before a new note-on in strict
order (could be the same note).
// Use the next note off iff it's earlier or the same time as the note on
if ((!_active_notes.empty())) {
- if (_type == NIL || _active_notes.top()->end_time() <= earliest_t) {
+ if (_type == NIL || _active_notes.top()->end_time().to_double() <= earliest_t.to_double()) {
_type = NOTE_OFF;
earliest_t = _active_notes.top()->end_time();
}