summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-10-25 20:36:10 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-10-25 20:36:10 +0000
commitcd1c58e031e29b83b85d433a90978745adc080c0 (patch)
tree426a5a492921058b3a564a49eef2461f1d75984c /libs
parente3d162a4adf43893e72a4c756e8508e147b783e8 (diff)
search $TOP/build/default/gtk2_ardour BEFORE ../gtk2_ardour when looking for bindings files etc ; make debug tracing show the "debug option" the output relates to as a prefix
git-svn-id: svn://localhost/ardour2/branches/3.0@5915 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/debug.h6
-rw-r--r--libs/ardour/globals.cc4
-rw-r--r--libs/ardour/midi_region.cc11
3 files changed, 10 insertions, 11 deletions
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h
index afaf7c221a..bc0fefb428 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -20,12 +20,14 @@
#ifndef __ardour_debug_h__
#define __ardour_debug_h__
+#include <stdint.h>
+
#include <sstream>
namespace ARDOUR {
extern uint64_t debug_bits;
- void debug_print (std::string str);
+ void debug_print (const char* prefix, std::string str);
void set_debug_bits (uint64_t bits);
namespace DEBUG {
@@ -42,7 +44,7 @@ namespace ARDOUR {
}
#ifndef NDEBUG
-#define DEBUG_TRACE(bits,str) if ((bits) & ARDOUR::debug_bits) { ARDOUR::debug_print (str); }
+#define DEBUG_TRACE(bits,str) if ((bits) & ARDOUR::debug_bits) { ARDOUR::debug_print (# bits, str); }
#define DEBUG_STR_SET(id,s) std::stringstream __debug_str ## id; __debug_str ## id << s;
#define DEBUG_STR(id) __debug_str ## id
#else
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 6cd6d0ea16..73b390b64a 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -112,9 +112,9 @@ mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
sigc::signal<void,std::string> ARDOUR::BootMessage;
void
-ARDOUR::debug_print (std::string str)
+ARDOUR::debug_print (const char* prefix, std::string str)
{
- cerr << str;
+ cerr << prefix << ": " << str;
}
void
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc
index b95f35f726..b06f18c1aa 100644
--- a/libs/ardour/midi_region.cc
+++ b/libs/ardour/midi_region.cc
@@ -153,6 +153,10 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<nframes_t>&
assert(chan_n == 0);
+ if (muted()) {
+ return 0; /* read nothing */
+ }
+
if (position < _position) {
internal_offset = 0;
src_offset = _position - position;
@@ -170,13 +174,6 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<nframes_t>&
return 0; /* read nothing */
}
- // FIXME: non-opaque MIDI regions not yet supported
- assert(opaque());
-
- if (muted()) {
- return 0; /* read nothing */
- }
-
_read_data_count = 0;
boost::shared_ptr<MidiSource> src = midi_source(chan_n);