diff data/model/FFTModel.h @ 551:408e56d30f58

* Re-enable peak frequencies display in spectrogram
author Chris Cannam
date Thu, 05 Feb 2009 17:33:21 +0000
parents 55ad231c9db7
children 53e5dc8439e7
line wrap: on
line diff
--- a/data/model/FFTModel.h	Thu Feb 05 14:17:11 2009 +0000
+++ b/data/model/FFTModel.h	Thu Feb 05 17:33:21 2009 +0000
@@ -85,13 +85,13 @@
         return m_server->isColumnReady(x << m_xshift);
     }
 
-    inline float getMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
+    inline bool getMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
         return m_server->getMagnitudesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio());
     }
-    inline float getNormalizedMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
+    inline bool getNormalizedMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
         return m_server->getNormalizedMagnitudesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio());
     }
-    inline float getPhasesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
+    inline bool getPhasesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
         return m_server->getPhasesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio());
     }
 
@@ -157,8 +157,8 @@
         MajorPitchAdaptivePeaks  /// Bigger window for higher frequencies
     };
 
-    typedef std::set<size_t> PeakLocationSet;
-    typedef std::map<size_t, float> PeakSet;
+    typedef std::set<size_t> PeakLocationSet; // bin
+    typedef std::map<size_t, float> PeakSet; // bin -> freq
 
     /**
      * Return locations of peak bins in the range [ymin,ymax].  If