do NOT reverse the route list during latency computations
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 20 Sep 2011 16:26:36 +0000 (16:26 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 20 Sep 2011 16:26:36 +0000 (16:26 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@10099 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/session.cc

index e2558be0bfcbe0f52ccaeebf4b0ef24e5a3620b8..11ba8682c7a5f0be7a34d0aa27207076965a4171 100644 (file)
@@ -958,7 +958,6 @@ Session::hookup_io ()
 
        /* Tell all IO objects to connect themselves together */
 
-       cerr << "Enable IO connections, state = " << _state_of_the_state << endl;
        IO::enable_connecting ();
 
        /* Now reset all panners */
@@ -1656,7 +1655,6 @@ Session::resort_routes ()
                resort_routes_using (r);
                /* writer goes out of scope and forces update */
        }
-
 }
 
 void
@@ -4419,13 +4417,17 @@ Session::update_latency (bool playback)
                return;
        }
 
-       boost::shared_ptr<RouteList> r = routes.reader ();
+       boost::shared_ptr<RouteList> r;
        nframes_t max_latency = 0;
 
        if (playback) {
                /* reverse the list so that we work backwards from the last route to run to the first */
+                RouteList* rl = routes.reader().get();
+                r.reset (new RouteList (*rl));
                reverse (r->begin(), r->end());
-       }
+       } else {
+                r = routes.reader ();
+        }
 
        /* compute actual latency values for the given direction and store them all in per-port
           structures. this will also publish the same values (to JACK) so that computation of latency