From cc543280d9869d4a7b800d547c53e38b13d02cea Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 12 Jun 2015 18:14:09 -0400 Subject: We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG mechanism away from a 64bit integer and toward std::bitset. Clean up a few minor related PBD::DEBUG issues along the way --- libs/ardour/midi_port.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'libs/ardour/midi_port.cc') diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index 615abede1c..f7a0d0fadb 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -231,18 +231,18 @@ MidiPort::flush_buffers (pframes_t nframes) // event times are in frames, relative to cycle start #ifndef NDEBUG - if (DEBUG::MidiIO & PBD::debug_bits) { - DEBUG_STR_DECL(a); - DEBUG_STR_APPEND(a, string_compose ("MidiPort %1 pop event @ %2 sz %3 ", _buffer, ev.time(), 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)(ev.buffer()[i])); - DEBUG_STR_APPEND(a,' '); - } - DEBUG_STR_APPEND(a,'\n'); - DEBUG_TRACE (DEBUG::MidiIO, DEBUG_STR(a).str()); - } + if (DEBUG_ENABLED (DEBUG::MidiIO)) { + DEBUG_STR_DECL(a); + DEBUG_STR_APPEND(a, string_compose ("MidiPort %1 pop event @ %2 sz %3 ", _buffer, ev.time(), 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)(ev.buffer()[i])); + DEBUG_STR_APPEND(a,' '); + } + DEBUG_STR_APPEND(a,'\n'); + DEBUG_TRACE (DEBUG::MidiIO, DEBUG_STR(a).str()); + } #endif assert (ev.time() < (nframes + _global_port_buffer_offset + _port_buffer_offset)); -- cgit v1.2.3