follow various events related to playhead priority (loop changes, parameter changes...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 16 Jan 2015 22:50:10 +0000 (17:50 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:13 +0000 (14:18 -0400)
libs/ardour/session.cc
libs/ardour/session_state.cc
libs/ardour/session_transport.cc

index 27b1aa461f0b2a8a09ae73a0b6e33a31c851b570..eb4b68d196babf5cc5fa1cebebc89529f84922fb 100644 (file)
@@ -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<framepos_t> (start, end);
        follow_playhead_priority ();
 }
index 5e07a9204ed2c524d0eefbbdbe94755248d01fa1..b51d7a7d694b7f1c30477c232076a09ebfc34d03 100644 (file)
@@ -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 ();
index f17e3b9c8adea4e8f77ea97c63f214743d67b92e..f73b935d94a486dcd4606c069e35936d8277366d 100644 (file)
@@ -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;
        }