summaryrefslogtreecommitdiff
path: root/libs/ardour/session_transport.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-07-28 01:08:57 +0000
committerDavid Robillard <d@drobilla.net>2006-07-28 01:08:57 +0000
commit8277d134b9733aee344782891c99f07114384d9e (patch)
tree4472cc8608cf59272b127e1c5c722e0530aaac58 /libs/ardour/session_transport.cc
parent60454cc8dc1ca5e1819b853b55916d52497d495c (diff)
Merged with trunk R708
git-svn-id: svn://localhost/ardour2/branches/midi@712 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r--libs/ardour/session_transport.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 6a92d71d1c..bff8ae5955 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -196,11 +196,11 @@ Session::realtime_stop (bool abort)
void
Session::butler_transport_work ()
{
- Glib::RWLock::ReaderLock rm (route_lock);
Glib::RWLock::ReaderLock dsm (diskstream_lock);
-
+ boost::shared_ptr<RouteList> r = routes.reader ();
+
if (post_transport_work & PostTransportCurveRealloc) {
- for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->curve_reallocate();
}
}
@@ -337,7 +337,9 @@ Session::non_realtime_stop (bool abort)
(*i)->transport_stopped (*now, xnow, abort);
}
- for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+ boost::shared_ptr<RouteList> r = routes.reader ();
+
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if (!(*i)->hidden()) {
(*i)->set_pending_declick (0);
}
@@ -546,7 +548,9 @@ Session::set_auto_loop (bool yn)
void
Session::flush_all_redirects ()
{
- for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+ boost::shared_ptr<RouteList> r = routes.reader ();
+
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->flush_redirects ();
}
}
@@ -1205,11 +1209,12 @@ Session::update_latency_compensation (bool with_stop, bool abort)
return;
}
- Glib::RWLock::ReaderLock lm (route_lock);
Glib::RWLock::ReaderLock lm2 (diskstream_lock);
_worst_track_latency = 0;
- for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+ boost::shared_ptr<RouteList> r = routes.reader ();
+
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if (with_stop) {
(*i)->handle_transport_stopped (abort, (post_transport_work & PostTransportLocate),
(!(post_transport_work & PostTransportLocate) || pending_locate_flush));
@@ -1227,7 +1232,7 @@ Session::update_latency_compensation (bool with_stop, bool abort)
}
}
- for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->set_latency_delay (_worst_track_latency);
}
@@ -1237,7 +1242,7 @@ Session::update_latency_compensation (bool with_stop, bool abort)
_engine.update_total_latencies ();
}
- set_worst_io_latencies (false);
+ set_worst_io_latencies ();
/* reflect any changes in latencies into capture offsets
*/