From ab2e23db9a31d60c6e7ade86795ec0f1d8f34bc1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 16 Jan 2015 17:50:10 -0500 Subject: [PATCH] follow various events related to playhead priority (loop changes, parameter changes); remove debug output --- libs/ardour/session.cc | 14 +++++++++++++- libs/ardour/session_state.cc | 2 ++ libs/ardour/session_transport.cc | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 27b1aa461f..eb4b68d196 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1451,6 +1451,19 @@ Session::auto_loop_changed (Location* location) clear_events (SessionEvent::AutoLoop); } + /* possibly move playhead if not rolling; if we are rolling we'll move + to the loop start on stop if that is appropriate. + */ + + framepos_t pos; + + if (!transport_rolling() && select_playhead_priority_target (pos)) { + if (pos == location->start()) { + request_locate (pos); + } + } + + last_loopend = location->end(); set_dirty (); } @@ -6115,7 +6128,6 @@ Session::reconnect_ltc_output () void Session::set_range_selection (framepos_t start, framepos_t end) { - cerr << "set range selection " << start << " .. " << end << endl; _range_selection = Evoral::Range (start, end); follow_playhead_priority (); } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 5e07a9204e..b51d7a7d69 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -3645,6 +3645,8 @@ Session::config_changed (std::string p, bool ours) reconnect_ltc_output (); } else if (p == "timecode-generator-offset") { ltc_tx_parse_offset(); + } else if (p == "auto-return-target-list") { + follow_playhead_priority (); } set_dirty (); diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index f17e3b9c8a..f73b935d94 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -500,7 +500,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to) jump_to = -1; AutoReturnTarget autoreturn = Config->get_auto_return_target_list (); - + if (!autoreturn) { return false; }