From 065b5ce8e7c0328153d087aa0209dbe6cb744d54 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 18 Mar 2011 20:20:20 +0000 Subject: actual working fix for threads/graph/route removal problem git-svn-id: svn://localhost/ardour2/branches/3.0@9167 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_process.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libs/ardour/session_process.cc') diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index c81a66755b..5d2cbb6180 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -149,7 +149,11 @@ Session::process_routes (pframes_t nframes, bool& need_butler) const framepos_t start_frame = _transport_frame; const framepos_t end_frame = _transport_frame + floor (nframes * _transport_speed); - if (route_graph->threads_in_use() > 0) { + /* XXX this is hack to force use of the graph even if we are only + using 1 thread. its needed because otherwise when we remove + tracks, the graph never gets updated. + */ + if (1 || route_graph->threads_in_use() > 0) { DEBUG_TRACE(DEBUG::Graph,"calling graph/process-routes\n"); route_graph->process_routes( nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler); } else { @@ -190,7 +194,11 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) const framepos_t start_frame = _transport_frame; const framepos_t end_frame = _transport_frame + lrintf(nframes * _transport_speed); - if (route_graph->threads_in_use() > 0) { + /* XXX this is hack to force use of the graph even if we are only + using 1 thread. its needed because otherwise when we remove + tracks, the graph never gets updated. + */ + if (1 || route_graph->threads_in_use() > 0) { route_graph->silent_process_routes( nframes, start_frame, end_frame, record_active, rec_monitors, need_butler); } else { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { -- cgit v1.2.3