diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-05 23:14:39 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-05 23:14:39 +0000 |
commit | c9e78d432ffefdbff9ba21a08af2356b041185b8 (patch) | |
tree | 57a6197a6d8a88644907040e5988320d49e8c4d1 /libs/ardour/buffer_set.cc | |
parent | f649d775bc4f1e8721214e81619099de46810783 (diff) |
some LV2 debug tracing
git-svn-id: svn://localhost/ardour2/branches/3.0@9078 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/buffer_set.cc')
-rw-r--r-- | libs/ardour/buffer_set.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc index 159a24c217..736c6a386d 100644 --- a/libs/ardour/buffer_set.cc +++ b/libs/ardour/buffer_set.cc @@ -25,6 +25,7 @@ #include <algorithm> #include "ardour/buffer.h" #include "ardour/buffer_set.h" +#include "ardour/debug.h" #include "ardour/midi_buffer.h" #include "ardour/port.h" #include "ardour/port_set.h" @@ -254,6 +255,12 @@ BufferSet::get_lv2_midi(bool input, size_t i) for (MidiBuffer::iterator e = mbuf.begin(); e != mbuf.end(); ++e) { const Evoral::MIDIEvent<framepos_t> ev(*e, false); uint32_t type = LV2Plugin::midi_event_type(); +#ifndef NDEBUG + DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", ev.size())); + for (uint16_t x = 0; x < ev.size(); ++x) { + DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) ev.buffer()[x])); + } +#endif ebuf->append(ev.time(), 0, type, ev.size(), ev.buffer()); } } @@ -275,6 +282,12 @@ BufferSet::flush_lv2_midi(bool input, size_t i) uint16_t size; uint8_t* data; ebuf->get_event(&frames, &subframes, &type, &size, &data); +#ifndef NDEBUG + DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", size)); + for (uint16_t x = 0; x < size; ++x) { + DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) data[x])); + } +#endif mbuf.push_back(frames, size, data); } } |