diff examples/SpectralCentroid.cpp @ 7:c66551966b5f

* Fix a couple of memory management and corruption bugs * Some textual fixes
author cannam
date Fri, 31 Mar 2006 17:39:49 +0000
parents 8f10d35a4090
children c4662bbef275
line wrap: on
line diff
--- a/examples/SpectralCentroid.cpp	Fri Mar 31 16:26:28 2006 +0000
+++ b/examples/SpectralCentroid.cpp	Fri Mar 31 17:39:49 2006 +0000
@@ -36,16 +36,13 @@
 
 #include "SpectralCentroid.h"
 
-/*
-#include "dsp/transforms/FFT.h"
-#include "base/Window.h"
-*/
-
 using std::string;
 using std::vector;
 using std::cerr;
 using std::endl;
 
+#include <cmath>
+
 
 SpectralCentroid::SpectralCentroid(float inputSampleRate) :
     Plugin(inputSampleRate),
@@ -75,7 +72,7 @@
 string
 SpectralCentroid::getMaker() const
 {
-    return "QMUL";
+    return "Queen Mary, University of London";
 }
 
 int
@@ -87,7 +84,7 @@
 string
 SpectralCentroid::getCopyright() const
 {
-    return "GPL";
+    return "Freely redistributable (BSD license)";
 }
 
 bool
@@ -157,21 +154,6 @@
 	return FeatureSet();
     }
 
-/*
-    for (size_t i = 0; i < m_blockSize; ++i) {
-	m_workBuffer[i] = inputBuffers[0][i];
-	m_workBuffer[i + m_blockSize] = 0.0;
-    }
-
-    Window<double>(HanningWindow, m_blockSize).cut(m_workBuffer);
-
-    FFT::process(m_blockSize, false,
-		 m_workBuffer,
-		 m_workBuffer + m_blockSize,
-		 m_workBuffer + m_blockSize*2,
-		 m_workBuffer + m_blockSize*3);
-*/
-
     double numLin = 0.0, numLog = 0.0, denom = 0.0;
 
     for (size_t i = 1; i < m_blockSize/2; ++i) {