Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
1566:f6e7d0e783e8 | 1567:36b4872e894a |
---|---|
328 inSmallCache.miss(); | 328 inSmallCache.miss(); |
329 | 329 |
330 Profiler profiler("FFTModel::getFFTColumn (cache miss)"); | 330 Profiler profiler("FFTModel::getFFTColumn (cache miss)"); |
331 | 331 |
332 auto samples = getSourceSamples(n); | 332 auto samples = getSourceSamples(n); |
333 m_windower.cut(samples.data()); | 333 m_windower.cut(samples.data() + (m_fftSize - m_windowSize) / 2); |
334 breakfastquay::v_fftshift(samples.data(), m_fftSize); | 334 breakfastquay::v_fftshift(samples.data(), m_fftSize); |
335 | 335 |
336 cvec &col = m_cached[m_cacheWriteIndex].col; | 336 cvec &col = m_cached[m_cacheWriteIndex].col; |
337 | 337 |
338 m_fft.forwardInterleaved(samples.data(), | 338 m_fft.forwardInterleaved(samples.data(), |