diff src/MatchFeeder.h @ 63:a540137d393b refactors_no_float

Fix handling of empty queues -- we should continue processing when a queue is empty only if we've reached end of file on both
author Chris Cannam
date Tue, 18 Nov 2014 10:03:36 +0000
parents faa523be20f9
children
line wrap: on
line diff
--- a/src/MatchFeeder.h	Fri Nov 14 13:53:58 2014 +0000
+++ b/src/MatchFeeder.h	Tue Nov 18 10:03:36 2014 +0000
@@ -35,6 +35,11 @@
      */
     void feed(const float *const *input);
 
+    /**
+     * Indicate that the input has come to an end.
+     */
+    void finish();
+    
     struct Features {
         std::vector<std::vector<double> > f1;
         std::vector<std::vector<double> > f2;
@@ -47,6 +52,12 @@
      * calculated by the two feeders.
      */
     Features feedAndGetFeatures(const float *const *input);
+
+    /**
+     * Indicate that the input has come to an end, and return any
+     * remaining features.
+     */
+    Features finishAndGetFeatures();
     
     Finder *getFinder() { return finder; }