diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-12 22:47:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-12 22:47:32 +0000 |
commit | 89a284fd7814dcc6329c1a1aeb7e5f538bc4a679 (patch) | |
tree | 930979e3b91129b53dc2229b89395fbf1db8f853 /libs/ardour/midi_diskstream.cc | |
parent | ab98398dc2696afa2e0903d797c018332d0799e4 (diff) |
add incoming MIDI stream debugging
git-svn-id: svn://localhost/ardour2/branches/3.0@9855 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_diskstream.cc')
-rw-r--r-- | libs/ardour/midi_diskstream.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index f6cab420ed..45b7e8f4de 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -528,6 +528,21 @@ MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) { const Evoral::MIDIEvent<MidiBuffer::TimeType> ev(*i, false); assert(ev.buffer()); +#ifndef NDEBUG + if (DEBUG::MidiIO & PBD::debug_bits) { + const uint8_t* __data = ev.buffer(); + DEBUG_STR_DECL(a); + DEBUG_STR_APPEND(a, string_compose ("mididiskstream %1 capture event @ %2 + %3 sz %4 ", this, ev.time(), transport_frame, ev.size())); + for (size_t i=0; i < ev.size(); ++i) { + DEBUG_STR_APPEND(a,hex); + DEBUG_STR_APPEND(a,"0x"); + DEBUG_STR_APPEND(a,(int)__data[i]); + DEBUG_STR_APPEND(a,' '); + } + DEBUG_STR_APPEND(a,'\n'); + DEBUG_TRACE (DEBUG::MidiIO, DEBUG_STR(a).str()); + } +#endif _capture_buf->write(ev.time() + transport_frame, ev.type(), ev.size(), ev.buffer()); } |