diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-10 17:31:43 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-10 17:31:43 +0000 |
commit | bc84cb7479a4f05f3a96de42a917a25d6a5f7dc7 (patch) | |
tree | 391a6ceae2b04ba549987ee3d0176ed254875022 /libs/ardour/midi_buffer.cc | |
parent | 65c97361a959a4b8e4be20a189338cc6480ebe3c (diff) |
Make a couple of bits of debug conditional to avoid mallocs when they are turned off.
git-svn-id: svn://localhost/ardour2/branches/3.0@8492 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_buffer.cc')
-rw-r--r-- | libs/ardour/midi_buffer.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc index c65ba58288..29bec23851 100644 --- a/libs/ardour/midi_buffer.cc +++ b/libs/ardour/midi_buffer.cc @@ -158,6 +158,7 @@ MidiBuffer::push_back(TimeType time, size_t size, const uint8_t* data) const size_t stamp_size = sizeof(TimeType); #ifndef NDEBUG + if (DEBUG::MidiIO & PBD::debug_bits) { DEBUG_STR_DECL(a); DEBUG_STR_APPEND(a, string_compose ("midibuffer %1 push event @ %2 sz %3 ", this, time, size)); for (size_t i=0; i < size; ++i) { @@ -168,6 +169,7 @@ MidiBuffer::push_back(TimeType time, size_t size, const uint8_t* data) } DEBUG_STR_APPEND(a,'\n'); DEBUG_TRACE (DEBUG::MidiIO, DEBUG_STR(a).str()); + } #endif if (_size + stamp_size + size >= _capacity) { |