diff src/Analyser.h @ 192:431a95c9d14d

Calculate frequency constraint for region outlining (does not actually do the analysis correctly yet)
author Chris Cannam
date Wed, 05 Mar 2014 09:36:13 +0000
parents 800e65412473
children 34797795a76c
line wrap: on
line diff
--- a/src/Analyser.h	Tue Mar 04 16:45:54 2014 +0000
+++ b/src/Analyser.h	Wed Mar 05 09:36:13 2014 +0000
@@ -84,12 +84,22 @@
 
     void getEnclosingSelectionScope(size_t f, size_t &f0, size_t &f1);
 
+    struct FrequencyRange {
+        FrequencyRange() : min(0), max(0) { }
+        FrequencyRange(float min_, float max_) : min(min_), max(max_) { }
+        bool isConstrained() const { return min != max; }
+        float min;
+        float max;
+    };
+
     /**
      * Analyse the selection and schedule asynchronous adds of
      * candidate layers for the region it contains. Returns "" on
-     * success or a user-readable error string on failure.
+     * success or a user-readable error string on failure. If the
+     * frequency range isConstrained(), analysis will be constrained
+     * to that range.
      */
-    QString reAnalyseSelection(Selection sel);
+    QString reAnalyseSelection(Selection sel, FrequencyRange range);
 
     /**
      * Return true if the analysed pitch candidates are currently
@@ -150,9 +160,6 @@
 signals:
     void layersChanged();
 
-protected slots:
-    void regionOutlined(QRect);
-
 protected:
     Document *m_document;
     WaveFileModel *m_fileModel;