From 0113de9b925531f329404413f6ce9993ab94250a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 29 Jul 2015 17:54:32 +0200 Subject: Don’t create MTC debug string if it’s not needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes periodic call to operator<< (and eventually loadlocale) in RT-thread in the debug version. --- libs/ardour/session_midi.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'libs/ardour/session_midi.cc') diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 19fb39ba14..a97f405563 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -537,11 +537,13 @@ Session::send_midi_time_code_for_cycle (framepos_t start_frame, framepos_t end_f } #ifndef NDEBUG - DEBUG_STR_DECL(foo) - DEBUG_STR_APPEND(foo,"sending "); - DEBUG_STR_APPEND(foo, transmitting_timecode_time); - DEBUG_TRACE (DEBUG::MTC, string_compose ("%1 qfm = %2, stamp = %3\n", DEBUG_STR(foo).str(), next_quarter_frame_to_send, - out_stamp)); + if (DEBUG_ENABLED(DEBUG::MTC)) { + DEBUG_STR_DECL(foo) + DEBUG_STR_APPEND(foo,"sending "); + DEBUG_STR_APPEND(foo, transmitting_timecode_time); + DEBUG_TRACE (DEBUG::MTC, string_compose ("%1 qfm = %2, stamp = %3\n", DEBUG_STR(foo).str(), next_quarter_frame_to_send, + out_stamp)); + } #endif // Increment quarter frame counter -- cgit v1.2.3