13
0

Blind fix for MIDI iteration bug.

This commit is contained in:
David Robillard 2014-12-29 15:12:10 -05:00
parent 190ac88248
commit cf6e9d3412

View File

@ -357,12 +357,12 @@ Sequence<Time>::const_iterator::operator++()
} }
// Use the next earliest controller iff it's earlier than the note event // Use the next earliest controller iff it's earlier than the note event
if (_control_iter != _control_iters.end() && _control_iter->x != DBL_MAX) { if (_control_iter != _control_iters.end() &&
if (_type == NIL || _control_iter->x < earliest_t.to_double()) { _control_iter->list && _control_iter->x != DBL_MAX &&
(_control_iter->x < earliest_t.to_double() || _type == NIL)) {
_type = CONTROL; _type = CONTROL;
earliest_t = Time(_control_iter->x); earliest_t = Time(_control_iter->x);
} }
}
// Use the next earliest SysEx iff it's earlier than the controller // Use the next earliest SysEx iff it's earlier than the controller
if (_sysex_iter != _seq->sysexes().end()) { if (_sysex_iter != _seq->sysexes().end()) {