|
-
-
- #ifndef filter_fir_h_
- #define filter_fir_h_
-
- #include "AudioStream.h"
- #include "arm_math.h"
-
- #define USE_FAST_FIR true
- #define USE_SLOW_FIR false
-
-
-
-
-
- #define MAX_COEFFS 150
-
-
-
- #define FIR_PASSTHRU ((short *) 1)
-
- class AudioFilterFIR :
- public AudioStream
- {
- public:
- AudioFilterFIR(const boolean a_f):
- AudioStream(1,inputQueueArray), arm_fast(a_f), coeff_p(NULL)
- {
- }
-
- void begin(short *coeff_p,int n_coeffs);
- virtual void update(void);
- void stop(void);
-
- private:
- audio_block_t *inputQueueArray[1];
-
-
-
- q15_t l_StateQ15[AUDIO_BLOCK_SAMPLES + MAX_COEFFS];
-
-
- const boolean arm_fast;
-
- short *coeff_p;
- arm_fir_instance_q15 l_fir_inst;
-
- };
-
- #endif
|