Channel-aware note recording in MidiModel (i.e. multi-channel note input doesn't cause stuck notes).

Fix MIDI regions randomly displaying 100% stuck notes (uninitialized MidiPlaylist::_note_mode).


git-svn-id: svn://localhost/ardour2/branches/3.0@3084 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2008-02-18 23:30:27 +00:00
parent fbfb26b45c
commit 466500fdaf
9 changed files with 62 additions and 34 deletions

View file

@ -444,14 +444,14 @@ SMFSource::write_unlocked (MidiRingBuffer& src, nframes_t cnt)
void
SMFSource::append_event_unlocked(const MidiEvent& ev)
{
/*printf("SMF %s - writing event, time = %lf, size = %u, data = ", _path.c_str(), ev.time(), ev.size());
printf("%s - append chan = %u, time = %lf, size = %u, data = ", _path.c_str(),
(unsigned)ev.channel(), ev.time(), ev.size());
for (size_t i=0; i < ev.size(); ++i) {
printf("%X ", ev.buffer()[i]);
}
printf("\n");*/
printf("\n");
assert(ev.time() >= 0);
assert(ev.time() >= _last_ev_time);
// FIXME: assumes tempo never changes after start