diff options
author | David Lamparter <equinox@diac24.net> | 2013-06-21 12:32:46 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2013-06-21 12:38:29 +0200 |
commit | e8d37e36f8b97fcc29c8f67d38f0cd5d48ec9d3f (patch) | |
tree | a3b493b069d16f4877cd43697bd194256d87c288 /gfft.h | |
parent | 2fd3ece434eb3656f481afd4e8801637fa8ce844 (diff) |
import
Diffstat (limited to 'gfft.h')
-rw-r--r-- | gfft.h | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +#ifndef _GFFT_H +#define _GFFT_H + +#include <glib.h> +#include <fftw3.h> + +#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 |