mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Gracefully ignore illegal MIDI events.
git-svn-id: svn://localhost/ardour2/branches/3.0@4591 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
473170200d
commit
85ab341795
4 changed files with 31 additions and 10 deletions
|
|
@ -580,6 +580,11 @@ Sequence<Time>::append(const Event<Time>& event)
|
|||
assert(_notes.empty() || ev.time() >= _notes.back()->time());
|
||||
assert(_writing);
|
||||
|
||||
if (!midi_event_is_valid(ev.buffer(), ev.size())) {
|
||||
cerr << "WARNING: Ignoring illegal MIDI event" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev.is_note_on()) {
|
||||
append_note_on_unlocked(ev.channel(), ev.time(), ev.note(), ev.velocity());
|
||||
} else if (ev.is_note_off()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue