Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef SAMPLEFILTER_H_
- #define SAMPLEFILTER_H_
- /*
- FIR filter designed with
- http://t-filter.appspot.com
- sampling frequency: 8000 Hz
- fixed point precision: 16 bits
- * 0 Hz - 2900 Hz
- gain = 0
- desired attenuation = -40 dB
- actual attenuation = n/a
- * 3000 Hz - 4000 Hz
- gain = 3
- desired ripple = 5 dB
- actual ripple = n/a
- */
- #define SAMPLEFILTER_TAP_NUM 101
- typedef struct {
- int history[SAMPLEFILTER_TAP_NUM];
- unsigned int last_index;
- } SampleFilter;
- void SampleFilter_init(SampleFilter* f);
- void SampleFilter_put(SampleFilter* f, int input);
- int SampleFilter_get(SampleFilter* f);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement