Hi,
in order to evaluate the performance of C5515, i'm using C5515 Audio Filter Demo. I acquire audio data from PC (youtube streaming) and putting them in the output port using ping pong buffer, in mono mode AIC3204 codec configuration. This sounds great and i have no issues.
if (CurrentRxL_DMAChannel ==2) { buff_copy(&RcvL1[0],&FilterOutL2[0], XMIT_BUFF_SIZE); }else{ buff_copy(&RcvL2[0],&FilterOutL2[0], XMIT_BUFF_SIZE); }
where XMIT_BUFF_SIZE is defined 1024.
Now, i have tried a change use hawfft, In short terms, i get the signal RcvL1, i FFT it using hwafft_1024pts, then i anti-transform it back ad output it (only one input buffer), according to the example explained http://www.ti.com/lit/an/sprabb6b/sprabb6b.pdf
Int32 *data;
Int32 *data_br;
Uint16 fft_flag;
Uint16 scale_flag;
Int32 *scratch;
Uint16 out_sel;
Int32 *result;
Int16 out[XMIT_BUFF_SIZE];
...
if (CurrentRxL_DMAChannel ==2) { for(i = 0 ; i < XMIT_BUFF_SIZE; i++){ temp = *(RcvL1 + i); *(data + i) = temp << 16; } hwafft_br(data, data_br, XMIT_BUFF_SIZE); data = data_br; out_sel = hwafft_1024pts(data, scratch, fft_flag, scale_flag); if (out_sel == OUT_SEL_DATA) { result = data; }else{ result = scratch; } hwafft_br(result, data_br, XMIT_BUFF_SIZE); data = data_br; out_sel = hwafft_1024pts(data, scratch, IFFT_FLAG, scale_flag); if (out_sel == OUT_SEL_DATA) { result = data; }else{ result = scratch; } for(i = 0; i < XMIT_BUFF_SIZE; i++) out[i] = (result[i] >> 16); buff_copy(&out[0],&FilterOutL1[0], XMIT_BUFF_SIZE); // RcvL1 size = 1024 } else { buff_copy(&RcvL2[0],&FilterOutL2[0], XMIT_BUFF_SIZE); } }
The issue consists that the signal is highly degraded.
Any tip? What's wrong in my code?
Thanks in advance,
Paolo