#ifdef-ize all/most uses of the boost debug hooks API
[ardour.git] / libs / ardour / route.cc
index 016c72b8a727e30e458d53e50507a522e7fb2a3b..68a4019cf75dc7b94a13ac9595779590b688080d 100644 (file)
@@ -27,6 +27,7 @@
 #include "pbd/memento_command.h"
 #include "pbd/stacktrace.h"
 #include "pbd/convert.h"
+#include "pbd/boost_debug.h"
 
 #include "evoral/Curve.hpp"
 
@@ -118,7 +119,11 @@ Route::init ()
 
         /* panning */
         
-        _pannable.reset (new Pannable (_session));
+        Pannable* p = new Pannable (_session);
+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
+       boost_debug_shared_ptr_mark_interesting (p, "Pannable");
+#endif
+        _pannable.reset (p);
 
        /* input and output objects */
 
@@ -1014,6 +1019,11 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
 int
 Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> before, ProcessorStreams* err)
 {
+       /* NOTE: this is intended to be used ONLY when copying
+          processors from another Route. Hence the subtle
+          differences between this and ::add_processor()
+       */
+
        ProcessorList::iterator loc;
 
        if (before) {
@@ -1023,17 +1033,6 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
                loc = find (_processors.begin(), _processors.end(), _main_outs);
        }
 
-       return add_processors (others, loc, err);
-}
-
-int
-Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter, ProcessorStreams* err)
-{
-       /* NOTE: this is intended to be used ONLY when copying
-          processors from another Route. Hence the subtle
-          differences between this and ::add_processor()
-       */
-
        ChanCount old_pms = processor_max_streams;
 
        if (!_session.engine().connected()) {
@@ -1071,7 +1070,7 @@ Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter
                                }
                        }
 
-                       ProcessorList::iterator inserted = _processors.insert (iter, *i);
+                       ProcessorList::iterator inserted = _processors.insert (loc, *i);
 
                        if ((*i)->active()) {
                                (*i)->activate ();
@@ -1602,13 +1601,6 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
                _meter->reset_max_channels (processor_max_streams);
        }
 
-        /* if we haven't bound the main outs panner & our pannable together yet, do it now ..
-         */
-
-        if (_main_outs && !_pannable->panner()) {
-                _pannable->set_panner (_main_outs->panner_shell()->panner());
-        }
-
        /* make sure we have sufficient scratch buffers to cope with the new processor
           configuration */
        _session.ensure_buffers (n_process_buffers ());
@@ -1778,10 +1770,8 @@ Route::reorder_processors (const ProcessorList& new_order, ProcessorStreams* err
                }
        }
 
-        if (true) {
-                processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
-               set_processor_positions ();
-        }
+       processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+       set_processor_positions ();
 
        return 0;
 }