diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-12 18:14:09 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-12 18:14:09 -0400 |
commit | cc543280d9869d4a7b800d547c53e38b13d02cea (patch) | |
tree | aa26b29a02fa43ff24e5c9c777cb5294bf67e8e9 /libs/ardour/midi_port.cc | |
parent | 10643779b6f039a7458bd0c970ef40ac80ea0568 (diff) |
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
Diffstat (limited to 'libs/ardour/midi_port.cc')
-rw-r--r-- | libs/ardour/midi_port.cc | 24 |
1 files changed, 12 insertions, 12 deletions
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)); |