diff options
author | David Robillard <d@drobilla.net> | 2008-05-12 02:40:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-05-12 02:40:48 +0000 |
commit | 8ca72c4eca3a712f5368680ba0fbce5beb831324 (patch) | |
tree | 65b29e7fe4bb0d28f8a113bf014e831d98c7d50b /libs/ardour/smf_source.cc | |
parent | a76e2128efea2d48fd873e95fd7c0f0b6f6135b3 (diff) |
Fix various MIDI corruption bugs.
Re-enable MIDI CC controller bars and other immediate output (hans commented out, tsk tsk).
Write channel mode as textual enumeration instead of magic number.
Better atomic (almost) channel mode switching on MIDI ring buffer (was a possible, if unlikely, source of corruption).
Handle some cases of broken MIDI, and oversized events, more gracefully.
git-svn-id: svn://localhost/ardour2/branches/3.0@3335 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/smf_source.cc')
-rw-r--r-- | libs/ardour/smf_source.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index 4ab7a9b973..389224eb3b 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -361,11 +361,11 @@ SMFSource::read_event(uint32_t* delta_t, uint32_t* size, Byte** buf) const if (event_size > 1) fread((*buf) + 1, 1, *size - 1, _fd); - printf("SMFSource %s read event: delta = %u, size = %u, data = ", _name.c_str(), *delta_t, *size); + /*printf("SMFSource %s read event: delta = %u, size = %u, data = ", _name.c_str(), *delta_t, *size); for (size_t i=0; i < *size; ++i) { printf("%X ", (*buf)[i]); } - printf("\n"); + printf("\n");*/ return (int)*size; } @@ -374,7 +374,7 @@ SMFSource::read_event(uint32_t* delta_t, uint32_t* size, Byte** buf) const nframes_t SMFSource::read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const { - cerr << "SMF read_unlocked " << name() << " read " << start << ", count=" << cnt << ", offset=" << stamp_offset << endl; + //cerr << "SMF read_unlocked " << name() << " read " << start << ", count=" << cnt << ", offset=" << stamp_offset << endl; // 64 bits ought to be enough for anybody uint64_t time = 0; // in SMF ticks, 1 tick per _ppqn |