changeset 1567:36b4872e894a

Properly align window with signal, in oversampled case
author Chris Cannam
date Wed, 07 Nov 2018 11:47:24 +0000
parents f6e7d0e783e8
children 2b532ff7f22e
files data/model/FFTModel.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/FFTModel.cpp	Tue Nov 06 11:12:58 2018 +0000
+++ b/data/model/FFTModel.cpp	Wed Nov 07 11:47:24 2018 +0000
@@ -330,7 +330,7 @@
     Profiler profiler("FFTModel::getFFTColumn (cache miss)");
     
     auto samples = getSourceSamples(n);
-    m_windower.cut(samples.data());
+    m_windower.cut(samples.data() + (m_fftSize - m_windowSize) / 2);
     breakfastquay::v_fftshift(samples.data(), m_fftSize);
 
     cvec &col = m_cached[m_cacheWriteIndex].col;