diff options
author | David Robillard <d@drobilla.net> | 2008-05-22 21:36:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-05-22 21:36:27 +0000 |
commit | 54bec37b5a72e1fae18be44c85f405f6bd99ee90 (patch) | |
tree | 981cccc1ab8341ea3404c91a9a7491d180afc855 /libs/ardour/midi_model.cc | |
parent | 39b2e2b572e4f2aa1f74668892bfc09f01da863e (diff) |
Fix corrupt MIDI file writing when meta events are present (fixes missing first note issue on some imported files).
Reduce number of buffer allocations on MIDI read/write.
git-svn-id: svn://localhost/ardour2/branches/3.0@3395 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r-- | libs/ardour/midi_model.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index 637b0ee38e..bf92c4f341 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -545,6 +545,7 @@ void MidiModel::append_note_on_unlocked(uint8_t chan, double time, /*cerr << "MidiModel " << this << " chan " << (int)chan << " note " << (int)note_num << " on @ " << time << endl;*/ + assert(note_num <= 127); assert(chan < 16); assert(_writing); _edited = true; @@ -565,6 +566,7 @@ void MidiModel::append_note_off_unlocked(uint8_t chan, double time, /*cerr << "MidiModel " << this << " chan " << (int)chan << " note " << (int)note_num << " off @ " << time << endl;*/ + assert(note_num <= 127); assert(chan < 16); assert(_writing); _edited = true; |