blob: 9f33fe25fc66b6439973779a8dbc7ea220ff7f15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#ifndef _FILTER_H
#define _FILTER_H
typedef struct filter {
int iter;
double a0, a1, a2, b1, b2;
double z1[64], z2[64];
} filter_t;
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);
void filter_process(filter_t *bq, sample_t *samples, int length);
#endif /* _FILTER_H */
|