}
#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)
_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
/* setup chain == pending chain - we have
to wait till this is no longer true.
*/
- _cleanup_cond.wait (_swap_mutex);
+ _cleanup_cond.wait (_swap_mutex);
}
}
// ok... this cycle is finished now.
// we are the only thread alive.
-
+
this->restart_cycle();
}
}
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;
if (!has_output)
_init_finished_refcount[chain] += 1;
- }
+ }
_pending_chain = chain;
dump(chain);
if (priority) {
struct sched_param rtparam;
-
+
memset (&rtparam, 0, sizeof (rtparam));
rtparam.sched_priority = priority;
-
+
pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam);
}
}
}
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;
}
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;
}
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;
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;
}