aboutsummaryrefslogtreecommitdiff
path: root/fft.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-03 19:00:41 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-03 19:00:41 +0000
commita5cc6ec7f4b449f255087e20b04cd4e4f607a52a (patch)
tree5daa8e5a1c3aa79ed1eed7ae34d2ba1db363767f /fft.c
parentdade6d9d0244cb53579fc682379004a849c3dedc (diff)
sync header
Diffstat (limited to 'fft.c')
-rw-r--r--fft.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fft.c b/fft.c
index 2655d79..412148e 100644
--- a/fft.c
+++ b/fft.c
@@ -22,6 +22,8 @@
#include <math.h>
#include <fftw3.h>
+#include "fft.h"
+
struct fft {
fftw_plan plan;
double *in;
@@ -66,12 +68,12 @@ init_fft(size_t n)
}
int
-exec_fft(struct fft *p, int16_t *data, double *out, int odd)
+exec_fft(struct fft *p, int16_t *data, double *out, enum fft_chan chan)
{
int i;
for (i = 0; i < p->n; i++)
- p->in[i] = p->window[i] * data[2 * i + odd]
+ p->in[i] = p->window[i] * data[2 * i + chan]
/ (double)INT16_MAX;
fftw_execute(p->plan);