chris goddard's region list patch; port 2.X marker drag/move changes to 3.0; compilat...
[ardour.git] / libs / ardour / location.cc
index 3654e03a9dcd7ab8081b272390c412e1fe8d7483..8dd4bbc636d129bd6f019719f296cf3abea37c77 100644 (file)
@@ -924,3 +924,16 @@ Locations::get_location_by_id(PBD::ID id)
 
     return 0;
 }
+
+void
+Locations::find_all_between (nframes64_t start, nframes64_t end, LocationList& ll, Location::Flags flags)
+{
+       Glib::Mutex::Lock lm (lock);
+
+       for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) {
+               if ((flags == 0 || (*i)->matches (flags)) && 
+                   ((*i)->start() >= start && (*i)->end() < end)) {
+                       ll.push_back (*i);
+               }
+       }
+}