#ifndef	_FFTFILT_H
#define	_FFTFILT_H

#include "cmplx.h"
#include "fft.h"

/* ---------------------------------------------------------------------- */

struct fftfilt {
	int filterlen;

        struct fft *fft;
        struct fft *ifft;

	complex *filter;

	complex *inbuf;
	int inptr;

	complex *outbuf;
	complex *ovlbuf;
};

/* ---------------------------------------------------------------------- */

extern struct fftfilt *init_fftfilt(double f1, double f2, int len);
extern void clear_fftfilt(struct fftfilt *s);

extern int fftfilt(struct fftfilt *, complex in, complex **out);

/* ---------------------------------------------------------------------- */

#endif
