tweak monitoring state logic
[ardour.git] / libs / ardour / graph.cc
index 18ea19d0bc45277f344a143902d6aa24c6fe24fe..cb5ac65f11075ee26c713979edc4067f37c1f6f7 100644 (file)
@@ -52,8 +52,8 @@ int alloc_allowed ()
 }
 #endif
 
-Graph::Graph (Session & session) 
-        : SessionHandleRef (session) 
+Graph::Graph (Session & session)
+        : SessionHandleRef (session)
         , _quit_threads (false)
        , _execution_sem ("graph_execution", 0)
        , _callback_start_sem ("graph_start", 0)
@@ -74,15 +74,15 @@ Graph::Graph (Session & session)
         _setup_chain   = 1;
         _quit_threads = false;
         _graph_empty = true;
-        
+
         reset_thread_list ();
 
         Config->ParameterChanged.connect_same_thread (processor_usage_connection, boost::bind (&Graph::parameter_changed, this, _1));
 
-#ifdef DEBUG_RT_ALLOC  
+#ifdef DEBUG_RT_ALLOC
        graph = this;
        pbd_alloc_allowed = &::alloc_allowed;
-#endif 
+#endif
 }
 
 void
@@ -189,7 +189,7 @@ Graph::clear_other_chain ()
                 /* setup chain == pending chain - we have
                    to wait till this is no longer true.
                 */
-                _cleanup_cond.wait (_swap_mutex);                
+                _cleanup_cond.wait (_swap_mutex);
         }
 }
 
@@ -240,7 +240,7 @@ Graph::dec_ref()
 
                 // ok... this cycle is finished now.
                 // we are the only thread alive.
-       
+
                 this->restart_cycle();
         }
 }
@@ -330,7 +330,7 @@ Graph::rechain (boost::shared_ptr<RouteList> routelist)
                 for (RouteList::iterator ri=routelist->begin(); ri!=routelist->end(); ri++) {
                         if (rp->direct_feeds (*ri)) {
                                 if (is_feedback (routelist, rp.get(), *ri)) {
-                                        continue; 
+                                        continue;
                                 }
 
                                 has_output = true;
@@ -355,7 +355,7 @@ Graph::rechain (boost::shared_ptr<RouteList> routelist)
 
                 if (!has_output)
                         _init_finished_refcount[chain] += 1;
-        } 
+        }
 
         _pending_chain = chain;
         dump(chain);
@@ -421,10 +421,10 @@ static void get_rt()
 
         if (priority) {
                 struct sched_param rtparam;
-       
+
                 memset (&rtparam, 0, sizeof (rtparam));
                 rtparam.sched_priority = priority;
-       
+
                 pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam);
         }
 }
@@ -512,14 +512,11 @@ Graph::dump (int chain)
 }
 
 int
-Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                              bool can_record, bool rec_monitors_input, bool& need_butler)
+Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool& need_butler)
 {
         _process_nframes = nframes;
         _process_start_frame = start_frame;
         _process_end_frame = end_frame;
-        _process_can_record = can_record;
-        _process_rec_monitors_input = rec_monitors_input;
 
         _process_silent = true;
         _process_noroll = false;
@@ -538,16 +535,13 @@ Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepo
 }
 
 int
-Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
-                       bool can_record, bool rec_monitors_input, bool& need_butler)
+Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler)
 {
        DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes));
 
         _process_nframes = nframes;
         _process_start_frame = start_frame;
         _process_end_frame = end_frame;
-        _process_can_record = can_record;
-        _process_rec_monitors_input = rec_monitors_input;
         _process_declick = declick;
 
         _process_silent = false;
@@ -567,15 +561,14 @@ Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end
 }
 
 int
-Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, 
-                       bool non_rt_pending, bool can_record, int declick)
+Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+                       bool non_rt_pending, int declick)
 {
        DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("no-roll graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes));
 
         _process_nframes = nframes;
         _process_start_frame = start_frame;
         _process_end_frame = end_frame;
-        _process_can_record = can_record;
         _process_declick = declick;
         _process_non_rt_pending = non_rt_pending;
 
@@ -601,19 +594,19 @@ Graph::process_one_route (Route* route)
         DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 runs route %2\n", pthread_self(), route->name()));
 
         if (_process_silent) {
-                retval = route->silent_roll (_process_nframes, _process_start_frame, _process_end_frame, _process_can_record, _process_rec_monitors_input, need_butler);
+                retval = route->silent_roll (_process_nframes, _process_start_frame, _process_end_frame, need_butler);
         } else if (_process_noroll) {
                 route->set_pending_declick (_process_declick);
-                retval = route->no_roll (_process_nframes, _process_start_frame, _process_end_frame, _process_non_rt_pending, _process_can_record, _process_declick);
+                retval = route->no_roll (_process_nframes, _process_start_frame, _process_end_frame, _process_non_rt_pending);
         } else {
                 route->set_pending_declick (_process_declick);
-                retval = route->roll (_process_nframes, _process_start_frame, _process_end_frame, _process_declick, _process_can_record, _process_rec_monitors_input, need_butler);
+                retval = route->roll (_process_nframes, _process_start_frame, _process_end_frame, _process_declick, need_butler);
         }
 
         if (retval) {
                 _process_retval = retval;
         }
-    
+
         if (need_butler) {
                 _process_need_butler = true;
         }