Parcourir la source

Correct storage class of some variables in FIR

dds
Pete (El Supremo) il y a 10 ans
Parent
révision
1d58a8e996
2 fichiers modifiés avec 11 ajouts et 18 suppressions
  1. +0
    -12
      Audio.cpp
  2. +11
    -6
      Audio.h

+ 0
- 12
Audio.cpp Voir le fichier

@@ -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 Voir le fichier

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



Chargement…
Annuler
Enregistrer