diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-26 20:15:00 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-26 20:15:00 +0100 |
commit | c3fe0cd95e1724e9cd258a407dfa7cc0c959561d (patch) | |
tree | a08c0f6ad754047197230311da4770c65dea7038 /libs/ardour/session.cc | |
parent | 28accee44e94985c39583b9842566f5a2134922d (diff) |
Consolidate loop en/disable calls
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 10fa5ed829..af02a33605 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1430,7 +1430,7 @@ Session::auto_loop_changed (Location* location) if (rolling) { - if (play_loop) { + if (get_play_loop ()) { if (_transport_sample < location->start() || _transport_sample > location->end()) { @@ -1563,15 +1563,9 @@ Session::set_auto_loop_location (Location* location) location->set_auto_loop (true, this); - if (Config->get_loop_is_mode() && play_loop) { - // set all tracks to use internal looping - boost::shared_ptr<RouteList> rl = routes.reader (); - for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i); - if (tr && !tr->is_private_route()) { - tr->set_loop (location); - } - } + if (Config->get_loop_is_mode() && get_play_loop ()) { + /* set all tracks to use internal looping */ + set_track_loop (true); } /* take care of our stuff first */ @@ -1734,7 +1728,7 @@ Session::location_removed (Location *location) { if (location->is_auto_loop()) { set_auto_loop_location (0); - if (!play_loop) { + if (!get_play_loop ()) { set_track_loop (false); } unset_play_loop (); |