commit a00057b4c81eec5f76104c74d010867fa61d06e7
parent 1ef950dcbf89dd8adf816009b54009f487828a45
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Sun, 27 Mar 2016 15:09:15 -0700
Fix precomputed cosine table
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/spek-pipeline.cc b/src/spek-pipeline.cc
@@ -110,7 +110,7 @@ struct spek_pipeline * spek_pipeline_open(
if (!p->file->get_error()) {
p->nfft = p->fft->get_input_size();
p->coss = (float*)malloc(p->nfft * sizeof(float));
- float cf = 2.0f * (float)M_PI / p->nfft;
+ float cf = 2.0f * (float)M_PI / (p->nfft - 1.0f);
for (int i = 0; i < p->nfft; ++i) {
p->coss[i] = cosf(cf * i);
}