diff src/Finder.h @ 60:faa523be20f9 refactors_no_float

Update both Feeders so as to recognise the end of one input before the other has ended. MatchFeeder does this by detecting trailing silence (as both its inputs are technically the same length since the shorter is zero-padded) and reporting that to Finder. MatchFeatureFeeder simply recognises missing features at the end and won't queue them.
author Chris Cannam
date Fri, 14 Nov 2014 13:53:58 +0000
parents 16870e8770ae
children 19a93b15fcc3
line wrap: on
line diff
--- a/src/Finder.h	Fri Nov 14 10:25:57 2014 +0000
+++ b/src/Finder.h	Fri Nov 14 13:53:58 2014 +0000
@@ -34,12 +34,22 @@
     int index1, index2, bestRow, bestCol;
     int *rowRange;
     int *colRange;
+    int duration1, duration2;
 
 public:
     Finder(Matcher *p1, Matcher *p2);
 
     ~Finder();
 
+    /**
+     * Tell the finder that one or both files ends sooner than it
+     * thought, i.e. that some of the trailing features are silence or
+     * otherwise to be ignored. d1 and d2 are feature frame counts for
+     * matchers 1 and 2 respectively. If this is not called, the full
+     * duration of each input will be considered.
+     */
+    void setDurations(int d1, int d2);
+    
     /** Sets up the instance variables to point to the given
      *  coordinate in the distance matrix.
      *