2016-02-16 17:56:55 +00:00
|
|
|
#ifndef _FILTER_H
|
|
|
|
#define _FILTER_H
|
2016-03-01 17:40:38 +00:00
|
|
|
|
2017-01-15 10:08:42 +00:00
|
|
|
typedef struct filter {
|
|
|
|
int iter;
|
2016-03-01 17:40:38 +00:00
|
|
|
double a0, a1, a2, b1, b2;
|
2017-01-15 10:08:42 +00:00
|
|
|
double z1[64], z2[64];
|
|
|
|
} filter_t;
|
2016-03-01 17:40:38 +00:00
|
|
|
|
2017-01-15 10:08:42 +00:00
|
|
|
void filter_lowpass_init(filter_t *bq, double frequency, int samplerate, int iterations);
|
|
|
|
void filter_highpass_init(filter_t *bq, double frequency, int samplerate, int iterations);
|
2017-01-29 06:25:12 +00:00
|
|
|
void filter_process(filter_t *bq, sample_t *samples, int length);
|
2016-03-01 17:40:38 +00:00
|
|
|
|
2016-02-16 17:56:55 +00:00
|
|
|
#endif /* _FILTER_H */
|