diff data/model/FFTModel.cpp @ 1567:36b4872e894a

Properly align window with signal, in oversampled case
author Chris Cannam
date Wed, 07 Nov 2018 11:47:24 +0000
parents 0925b37a3ed1
children c2c8e071e24f
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;