summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-09-16 21:32:58 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-09-16 21:32:58 -0400
commit80c0400cda944aceff67e15d9a990b46edbc6a09 (patch)
tree42e4e96cfd24e1c22fdc19015b4f1db57a5eea11
parentb592ce3e442a92a2a29468c94f7738742bd71bb0 (diff)
initial attempt to push certain kinds of Locations into LocateRoll events on the timeline for skip lists
-rw-r--r--libs/ardour/session.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index c371073863..e7dd6a9cd1 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1295,6 +1295,7 @@ Session::set_auto_loop_location (Location* location)
void
Session::locations_added (Location *)
{
+ _locations->apply (*this, &Session::sync_locations_to_skips);
set_dirty ();
}
@@ -1330,6 +1331,8 @@ Session::handle_locations_changed (Locations::LocationList& locations)
}
}
+ sync_locations_to_skips (locations);
+
if (!set_loop) {
set_auto_loop_location (0);
}
@@ -1341,6 +1344,25 @@ Session::handle_locations_changed (Locations::LocationList& locations)
}
void
+Session::sync_locations_to_skips (Locations::LocationList& locations)
+{
+ Locations::LocationList::iterator i;
+ Location* location;
+
+ clear_events (SessionEvent::LocateRoll);
+
+ for (i = locations.begin(); i != locations.end(); ++i) {
+
+ location = *i;
+
+ if (location->is_range_marker()) {
+ SessionEvent* ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, location->start(), location->end(), 1.0);
+ queue_event (ev);
+ }
+ }
+}
+
+void
Session::enable_record ()
{
if (_transport_speed != 0.0 && _transport_speed != 1.0) {