已回答假定已回答

BF706-EZM IIR Filter示例代码相关问题

QGingerZ 在 2018-7-8 詢問的問題

示例程序当中有一个AudioCallBack的程序, 当中有这样一段程序【1】。 我右击打开irdf1_fr32函数看到第二段#pragma开头的程序,那么子程序当中是通过IIRfilter处理音频的呢?

==============================================================================================【1】

 

/* Compute filter response  */

void AudioFilter(const fract32 dataIn[], fract32 dataOut[])

 

{

int n;

int i;

 

/* separate channels (2D DMA would be better) */

i = 0;

for (n=0; n<SAMPLES_PER_CHAN; n++){

inLeft[n] = dataIn[i++];

inRight[n] = dataIn[i++];

}

 

/* left channel filter */

iirdf1_fr32 (inLeft, outLeft, SAMPLES_PER_CHAN, &stateLeft);

 

/* right channel filter */

iirdf1_fr32 (inRight, outRight, SAMPLES_PER_CHAN, &stateRight);

 

/* combine channels (2D DMA would be better) */

i = 0;

for (n=0; n<SAMPLES_PER_CHAN; n++){

dataOut[i++] = outLeft[n];

dataOut[i++] = outRight[n];

}

 

}

 

=========================================【2】

 

#pragma linkage_name __iirdf1_fr32

 

        void iirdf1_fr32 (const fract32 _input[],

                          fract32 _output[], int _length,

                          iirdf1_state_fr32 *_filter_state);

 

源代码链接:

http://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-bf706-mini.html

 

EmmaChenHenryL

結果