From e8d37e36f8b97fcc29c8f67d38f0cd5d48ec9d3f Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 21 Jun 2013 12:32:46 +0200 Subject: import --- gfft.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gfft.h (limited to 'gfft.h') diff --git a/gfft.h b/gfft.h new file mode 100644 index 0000000..a92b81c --- /dev/null +++ b/gfft.h @@ -0,0 +1,39 @@ +#ifndef _GFFT_H +#define _GFFT_H + +#include +#include + +#include "galsa.h" + +typedef void window_func(sample *in, double *out, size_t size, int ch, int nch); + +struct fft_runner { + struct device *dev; + GAsyncQueue *queue; + GThread *thread; + window_func *winf; + size_t span; +}; + +enum fe_message { + FE_DATA, + FE_DEV_ERROR, + FE_STOPPED, +}; + +struct fe { + enum fe_message message; + int errcode; + char *errp; + fftw_complex *data; + size_t size; +}; + +extern void window_hard(sample *in, double *out, size_t size, int ch, int nch); +extern void window_hann(sample *in, double *out, size_t size, int ch, int nch); + +extern struct fft_runner *fftrun_attach(struct device *device, + window_func *winf, size_t span); + +#endif -- cgit v1.2.1