Mercurial > hg > sonic-visualiser
diff transform/FeatureExtractionPluginTransform.cpp @ 79:c1318aac18d2
* Fix apparent (but not actual) failure to save session file
* Fix doofusness in FFT model (N/2 vs N/2+1) -- need to review use of
this model in spectrogram
author | Chris Cannam |
---|---|
date | Fri, 08 Dec 2006 18:17:29 +0000 |
parents | bedc7517b6e8 |
children | dd11619b73ba |
line wrap: on
line diff
--- a/transform/FeatureExtractionPluginTransform.cpp Fri Nov 24 16:56:15 2006 +0000 +++ b/transform/FeatureExtractionPluginTransform.cpp Fri Dec 08 18:17:29 2006 +0000 @@ -31,8 +31,6 @@ #include <QMessageBox> -#include <fftw3.h> - #include <iostream> FeatureExtractionPluginTransform::FeatureExtractionPluginTransform(Model *inputModel, @@ -244,7 +242,7 @@ float **buffers = new float*[channelCount]; for (size_t ch = 0; ch < channelCount; ++ch) { - buffers[ch] = new float[m_context.blockSize]; + buffers[ch] = new float[m_context.blockSize + 2]; } bool frequencyDomain = (m_plugin->getInputDomain() == @@ -301,7 +299,7 @@ for (size_t ch = 0; ch < channelCount; ++ch) { if (frequencyDomain) { int column = (blockFrame - startFrame) / m_context.stepSize; - for (size_t i = 0; i < m_context.blockSize/2; ++i) { + for (size_t i = 0; i <= m_context.blockSize/2; ++i) { fftModels[ch]->getValuesAt (column, i, buffers[ch][i*2], buffers[ch][i*2+1]); }