aboutsummaryrefslogtreecommitdiff
path: root/fft.c
diff options
context:
space:
mode:
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);