diff data/fft/FFTDataServer.cpp @ 500:83eae5239db6

* Permit viewing (though not editing) colour 3d plot layer data in the spreadsheet data viewer dialog * Add somewhat simplistic RDF export for layers * Fix display of peak frequencies in spectrum layer * Fix (I hope) sizing of plugin parameter dialog
author Chris Cannam
date Tue, 02 Dec 2008 17:17:25 +0000
parents b6dc6c7f402c
children bd7c46636bd0
line wrap: on
line diff
--- a/data/fft/FFTDataServer.cpp	Fri Nov 28 15:45:20 2008 +0000
+++ b/data/fft/FFTDataServer.cpp	Tue Dec 02 17:17:25 2008 +0000
@@ -916,10 +916,14 @@
         fillColumn(x, true);
     }
 
+    float mean = 0.f;
     for (size_t i = 0; i < count; ++i) {
         values[i] = cache->getMagnitudeAt(col, i * step + minbin);
+        mean += values[i];
     }
+    if (count > 0) mean /= count;
 
+//    std::cerr << "FFTDataServer::getMagnitudeAt: returning " << count << " values of mean " << mean << std::endl;
     return true;
 }