소스 검색

Correct storage class of some variables in FIR

dds
Pete (El Supremo) 10 년 전
부모
커밋
1d58a8e996
2개의 변경된 파일11개의 추가작업 그리고 18개의 파일을 삭제
  1. +0
    -12
      Audio.cpp
  2. +11
    -6
      Audio.h

+ 0
- 12
Audio.cpp 파일 보기

@@ -3113,20 +3113,8 @@ bool AudioControlSGTL5000::volumeInteger(unsigned int n)




/******************************************************************/

// 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 AudioFilterFIR::l_StateQ15[AUDIO_BLOCK_SAMPLES + MAX_COEFFS];
q15_t AudioFilterFIR::r_StateQ15[AUDIO_BLOCK_SAMPLES + MAX_COEFFS];
arm_fir_instance_q15 AudioFilterFIR::l_fir_inst;
arm_fir_instance_q15 AudioFilterFIR::r_fir_inst;

// pointer to current coefficients or NULL or FIR_PASSTHRU
short * AudioFilterFIR::coeff_p = NULL;

void AudioFilterFIR::begin(short *cp,int n_coeffs)
{
// pointer to coefficients

+ 11
- 6
Audio.h 파일 보기

@@ -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;
};



Loading…
취소
저장