|
|
@@ -578,7 +578,8 @@ public AudioStream |
|
|
|
{ |
|
|
|
public: |
|
|
|
AudioFilterFIR(void): |
|
|
|
AudioStream(2,inputQueueArray) { |
|
|
|
AudioStream(2,inputQueueArray), coeff_p(NULL) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
void begin(short *coeff_p,int f_pin); |
|
|
@@ -587,11 +588,15 @@ public: |
|
|
|
|
|
|
|
private: |
|
|
|
audio_block_t *inputQueueArray[2]; |
|
|
|
static q15_t l_StateQ15[]; |
|
|
|
static q15_t r_StateQ15[]; |
|
|
|
static arm_fir_instance_q15 l_fir_inst; |
|
|
|
static arm_fir_instance_q15 r_fir_inst; |
|
|
|
static short *coeff_p; |
|
|
|
// arm state arrays and FIR instances for left and right channels |
|
|
|
// the state arrays are defined to handle a maximum of MAX_COEFFS |
|
|
|
// coefficients in a filter |
|
|
|
q15_t l_StateQ15[AUDIO_BLOCK_SAMPLES + MAX_COEFFS]; |
|
|
|
q15_t r_StateQ15[AUDIO_BLOCK_SAMPLES + MAX_COEFFS]; |
|
|
|
arm_fir_instance_q15 l_fir_inst; |
|
|
|
arm_fir_instance_q15 r_fir_inst; |
|
|
|
// pointer to current coefficients or NULL or FIR_PASSTHRU |
|
|
|
short *coeff_p; |
|
|
|
}; |
|
|
|
|
|
|
|
|