diff base/EventSeries.h @ 1638:b57a75aa5ae3 single-point

Add getEventsStartingWithin
author Chris Cannam
date Wed, 13 Mar 2019 10:55:02 +0000
parents e8e51f3ca120
children e7f557789f99
line wrap: on
line diff
--- a/base/EventSeries.h	Wed Mar 13 10:54:42 2019 +0000
+++ b/base/EventSeries.h	Wed Mar 13 10:55:02 2019 +0000
@@ -95,6 +95,19 @@
                                 sv_frame_t duration) const;
 
     /**
+     * Retrieve all events starting within the range in frames defined
+     * by the given frame f and duration d.
+     *
+     * - An event without duration starts within the range if its own
+     * frame is greater than or equal to f and less than f + d.
+     * 
+     * - An event with duration starts within the range if its start
+     * frame is greater than or equal to f.
+     */
+    EventVector getEventsStartingWithin(sv_frame_t frame,
+                                        sv_frame_t duration) const;
+
+    /**
      * Retrieve all events that cover the given frame. An event without
      * duration covers a frame if its own frame is equal to it. An event
      * with duration covers a frame if its start frame is less than or