X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fmidi_ring_buffer.cc;h=a10ad0b19971979ea69621fb640f77435356fb81;hb=f17e2847b87a4b5a5dcc19ee1cb811fafe7c6895;hp=b25154fefb3d088bed3884893f416ba808457509;hpb=73192bc1a7ea55fa1864dc3826845b15c00dd2ec;p=ardour.git diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc index b25154fefb..a10ad0b199 100644 --- a/libs/ardour/midi_ring_buffer.cc +++ b/libs/ardour/midi_ring_buffer.cc @@ -137,16 +137,18 @@ MidiRingBuffer::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame success = read_contents (ev_size, write_loc); #ifndef NDEBUG - DEBUG_STR_DECL(a); - DEBUG_STR_APPEND(a, string_compose ("wrote MidiEvent to Buffer (time=%1, start=%2 offset=%3)", ev_time, start, offset)); - for (size_t i=0; i < ev_size; ++i) { - DEBUG_STR_APPEND(a,hex); - DEBUG_STR_APPEND(a,"0x"); - DEBUG_STR_APPEND(a,(int)write_loc[i]); - DEBUG_STR_APPEND(a,' '); + if (DEBUG::MidiDiskstreamIO && PBD::debug_bits) { + DEBUG_STR_DECL(a); + DEBUG_STR_APPEND(a, string_compose ("wrote MidiEvent to Buffer (time=%1, start=%2 offset=%3)", ev_time, start, offset)); + for (size_t i=0; i < ev_size; ++i) { + DEBUG_STR_APPEND(a,hex); + DEBUG_STR_APPEND(a,"0x"); + DEBUG_STR_APPEND(a,(int)write_loc[i]); + DEBUG_STR_APPEND(a,' '); + } + DEBUG_STR_APPEND(a,'\n'); + DEBUG_TRACE (DEBUG::MidiDiskstreamIO, DEBUG_STR(a).str()); } - DEBUG_STR_APPEND(a,'\n'); - DEBUG_TRACE (DEBUG::MidiDiskstreamIO, DEBUG_STR(a).str()); #endif if (success) {