diff options
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 7ee854dc2d..f2343e1013 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -153,7 +153,6 @@ Session::Session (AudioEngine &eng, , _post_transport_work (0) , _send_timecode_update (false) , _all_route_group (new RouteGroup (*this, "all")) - , _process_graph (new Graph (*this)) , routes (new RouteList) , _total_free_4k_blocks (0) , _bundles (new BundleList) @@ -169,6 +168,13 @@ Session::Session (AudioEngine &eng, { _locations = new Locations (*this); + if (how_many_dsp_threads () > 1) { + /* For now, only create the graph if we are using >1 DSP threads, as + it is a bit slower than the old code with 1 thread. + */ + _process_graph.reset (new Graph (*this)); + } + playlists.reset (new SessionPlaylists); _all_route_group->set_active (true, this); @@ -1384,8 +1390,6 @@ Session::resort_routes () /* writer goes out of scope and forces update */ } - //_process_graph->dump(1); - #ifndef NDEBUG boost::shared_ptr<RouteList> rl = routes.reader (); for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { @@ -1460,7 +1464,10 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r) Note: the process graph rechain does not require a topologically-sorted list, but hey ho. */ - _process_graph->rechain (sorted_routes, edges); + if (_process_graph) { + _process_graph->rechain (sorted_routes, edges); + } + _current_route_graph = edges; /* Complete the building of the routes' lists of what directly @@ -2315,7 +2322,9 @@ Session::remove_route (boost::shared_ptr<Route> route) */ resort_routes (); - _process_graph->clear_other_chain (); + if (_process_graph) { + _process_graph->clear_other_chain (); + } /* get rid of it from the dead wood collection in the route list manager */ |