Fix FFT first sample location

Fix wangqr/Aegisub#1
This commit is contained in:
wangqr 2019-05-22 20:10:09 -04:00
parent f733297499
commit 019e68147e
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ void AudioSpectrumRenderer::FillBlock(size_t block_index, float *block)
assert(cache);
assert(block);
int64_t first_sample = ((int64_t)block_index) << derivation_dist;
int64_t first_sample = (((int64_t)block_index) << derivation_dist) - ((int64_t)1 << derivation_size);
provider->GetAudio(&audio_scratch[0], first_sample, 2 << derivation_size);
#ifdef WITH_FFTW3