+
+ // event times are in frames, relative to cycle start
+
+#ifndef NDEBUG
+ if (DEBUG_ENABLED (DEBUG::MidiIO)) {
+ const Session* s = AudioEngine::instance()->session();
+ const framepos_t now = (s ? s->transport_frame() : 0);
+ DEBUG_STR_DECL(a);
+ DEBUG_STR_APPEND(a, string_compose ("MidiPort %8 %1 pop event @ %2 (global %4, within %5 gpbo %6 pbo %7 sz %3 ", _buffer, ev.time(), ev.size(),
+ now + ev.time(), nframes, _global_port_buffer_offset, _port_buffer_offset, name()));
+ for (size_t i=0; i < ev.size(); ++i) {
+ DEBUG_STR_APPEND(a,hex);
+ DEBUG_STR_APPEND(a,"0x");
+ DEBUG_STR_APPEND(a,(int)(ev.buffer()[i]));
+ DEBUG_STR_APPEND(a,' ');
+ }
+ DEBUG_STR_APPEND(a,'\n');
+ DEBUG_TRACE (DEBUG::MidiIO, DEBUG_STR(a).str());