aboutsummaryrefslogtreecommitdiffstats
path: root/src/libfilter/iir_filter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfilter/iir_filter.h')
-rw-r--r--src/libfilter/iir_filter.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libfilter/iir_filter.h b/src/libfilter/iir_filter.h
new file mode 100644
index 0000000..a5956c8
--- /dev/null
+++ b/src/libfilter/iir_filter.h
@@ -0,0 +1,17 @@
+#ifndef _FILTER_H
+#define _FILTER_H
+
+typedef struct iir_filter {
+ int iter;
+ double a0, a1, a2, b1, b2;
+ double z1[64], z2[64];
+} iir_filter_t;
+
+void iir_lowpass_init(iir_filter_t *filter, double frequency, int samplerate, int iterations);
+void iir_highpass_init(iir_filter_t *filter, double frequency, int samplerate, int iterations);
+void iir_bandpass_init(iir_filter_t *filter, double frequency, int samplerate, int iterations);
+void iir_notch_init(iir_filter_t *filter, double frequency, int samplerate, int iterations);
+void iir_process(iir_filter_t *filter, sample_t *samples, int length);
+void iir_process_baseband(iir_filter_t *filter, float *baseband, int length);
+
+#endif /* _FILTER_H */