summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/opts.cc5
-rw-r--r--libs/ardour/ardour/debug.h4
-rw-r--r--libs/ardour/route.cc25
3 files changed, 21 insertions, 13 deletions
diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc
index cd45bed9ff..c35927dad8 100644
--- a/gtk2_ardour/opts.cc
+++ b/gtk2_ardour/opts.cc
@@ -83,6 +83,7 @@ list_debug_options ()
cerr << "\tMidiDiskstreamIO\n";
cerr << "\tSnapBBT\n";
cerr << "\tConfiguration\n";
+ cerr << "\tLatency\n";
}
static int
@@ -118,6 +119,10 @@ parse_debug_options (const char* str)
bits |= ARDOUR::DEBUG::SnapBBT;
} else if (strncasecmp (p, "configuration", strlen (p)) == 0) {
bits |= ARDOUR::DEBUG::Configuration;
+ } else if (strncasecmp (p, "latency", strlen (p)) == 0) {
+ bits |= ARDOUR::DEBUG::Latency;
+ } else if (strncasecmp (p, "processors", strlen (p)) == 0) {
+ bits |= ARDOUR::DEBUG::Processors;
}
p = strtok_r (0, ",", &sp);
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h
index d91b3c1449..926d5520d7 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -39,7 +39,9 @@ namespace ARDOUR {
MidiPlaylistIO = 0x2,
MidiDiskstreamIO = 0x4,
SnapBBT = 0x8,
- Configuration = 0x10
+ Configuration = 0x10,
+ Latency = 0x20,
+ Processors = 0x40
};
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 935d98e3e6..248d60ab67 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -36,6 +36,7 @@
#include "ardour/buffer_set.h"
#include "ardour/configuration.h"
#include "ardour/cycle_timer.h"
+#include "ardour/debug.h"
#include "ardour/delivery.h"
#include "ardour/dB.h"
#include "ardour/internal_send.h"
@@ -621,7 +622,7 @@ Route::muted() const
return _mute_master->muted ();
}
-#if 1
+#if 0
static void
dump_processors(const string& name, const list<boost::shared_ptr<Processor> >& procs)
{
@@ -1399,13 +1400,19 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
list< pair<ChanCount,ChanCount> > configuration;
uint32_t index = 0;
- cerr << _name << " CONFIGURE PROCESSORS\n";
- dump_processors (_name, _processors);
+ DEBUG_TRACE (DEBUG::Processors, string_compose ("%1: configure processors\n", _name));
+#ifndef NDEBUG
+ DEBUG_TRACE (DEBUG::Processors, "{\n");
+ for (list<boost::shared_ptr<Processor> >::const_iterator p = _processors.begin(); p != _processors.end(); ++p) {
+ DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1 ID = %2", (*p)->name(), (*p)->id()));
+ }
+ DEBUG_TRACE (DEBUG::Processors, "}\n");
+#endif
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++index) {
if ((*p)->can_support_io_configuration(in, out)) {
- cerr << "\t" << (*p)->name() << " in = " << in << " out = " << out << endl;
+ DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1in = %2 out = %3\n",(*p)->name(), in, out));
configuration.push_back(make_pair(in, out));
in = out;
} else {
@@ -2712,10 +2719,7 @@ Route::update_total_latency ()
}
}
-#undef DEBUG_LATENCY
-#ifdef DEBUG_LATENCY
- cerr << _name << ": internal redirect latency = " << own_latency << endl;
-#endif
+ DEBUG_TRACE (DEBUG::Latency, string_compose ("%1: internal redirect latency = %2\n", _name, own_latency));
_output->set_port_latency (own_latency);
@@ -2736,10 +2740,7 @@ Route::update_total_latency ()
signal_latency_changed (); /* EMIT SIGNAL */
}
-#ifdef DEBUG_LATENCY
- cerr << _name << ": input latency = " << _input->signal_latency() << " total = "
- << own_latency << endl;
-#endif
+ DEBUG_TRACE (DEBUG::Latency, string_compose ("%1: input latency = %2 total = %3\n", _name, _input->signal_latency(), own_latency));
return _output->effective_latency ();
}