diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index b34892213a..32943728c9 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -610,22 +610,15 @@ GraphChain::GraphChain (GraphNodeList const& nodelist, GraphEdges const& edges) */ _n_terminal_nodes = 0; - /* This will become a list of nodes that are not fed by another node, ie - * those at the `input' end. - */ - _init_trigger_list.clear (); - - _nodes_rt.clear (); - /* copy nodelist to _nodes_rt, prepare GraphNodes for this graph */ - for (auto const& ri : nodelist) { - RCUWriter wa (ri->_activation_set); - RCUWriter wr (ri->_init_refcount); + for (auto const& ni : nodelist) { + RCUWriter wa (ni->_activation_set); + RCUWriter wr (ni->_init_refcount); boost::shared_ptr ma (wa.get_copy ()); boost::shared_ptr mr (wr.get_copy ()); (*mr)[this] = 0; (*ma)[this].clear (); - _nodes_rt.push_back (ri); + _nodes_rt.push_back (ni); } /* now add refs for the connections. */ diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index be71f9df72..ed0b6c2dfd 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2213,6 +2213,7 @@ Session::resort_routes_using (boost::shared_ptr r) bool ok = true; if (rechain_process_graph (gnl)) { + /* Update routelist for single-threaded processing, use topologically sorted nodelist */ r->clear (); for (auto const& nd : gnl) { r->push_back (boost::dynamic_pointer_cast (nd));