diff base/EventSeries.h @ 1654:26aa42fd60e9 single-point

Add overspill to events-within search
author Chris Cannam
date Wed, 20 Mar 2019 11:12:54 +0000
parents eaad70939848
children e4084bc60fe8
line wrap: on
line diff
--- a/base/EventSeries.h	Tue Mar 19 14:24:05 2019 +0000
+++ b/base/EventSeries.h	Wed Mar 20 11:12:54 2019 +0000
@@ -102,9 +102,14 @@
      * - An event with duration is within the range if its start frame
      * is greater than or equal to f and its start frame plus its
      * duration is less than or equal to f + d.
+     *
+     * If overspill is greater than zero, also include that number of
+     * additional events (where they exist) both before and after the
+     * edges of the range.
      */
     EventVector getEventsWithin(sv_frame_t frame,
-                                sv_frame_t duration) const;
+                                sv_frame_t duration,
+                                int overspill = 0) const;
 
     /**
      * Retrieve all events starting within the range in frames defined