Good morning,

I'm trying to do some audio processing with my SHARC 21479 EZ-KIT Lite passing through the frequency domain.

But I have a problem.

When I simply do the fft and then the ifft (without any processing) I notice that the result of ifft function in a complex_float, while my input signal was float data.

The question is: Is this normal? how can I write the ifft result on the buffer? I tried to write only the real part but I hear distortion.

I'm working on the "21479 AD1939 C Block-Based Talkthru 48 or 96 kHz" example

#define NUM_SAMPLES 512

void Realmemcopy(complex_float *input, float *output, unsigned int number)

{

int i;

for(i = 0; i < number; i++)

{

output[i] = input[i].re;

}

}

void AudioProcessing()

{

complex_float FreqRx_L1[NUM_SAMPLES], FreqRx_R1[NUM_SAMPLES], Out_L1[NUM_SAMPLES], Out_R1[NUM_SAMPLES];

int i;

rfft512(Analog.Rx_L1, FreqRx_L1);

rfft512(Analog.Rx_R1, FreqRx_R1);

for(i = NUM_SAMPLES/2; i < NUM_SAMPLES; i++)

{

FreqRx_L1[i].re = 0;

FreqRx_L1[i].im = 0;

FreqRx_R1[i].re = 0;

FreqRx_R1[i].im = 0;

}

ifft256(FreqRx_L1, Out_L1);

ifft256(FreqRx_R1, Out_R1);

Realmemcopy(Out_L1, Analog.Tx_L1, NUM_SAMPLES);

Realmemcopy(Out_R1, Analog.Tx_R1, NUM_SAMPLES);

}

Hi Luca,

The input to ifftN are two floating-point arrays of N points. The array real_input contains the real components of the inverse FFT input and the array imag_input contains the imaginary components. For example,

ifft8 (r_inp, i_inp, r_outp, i_outp);

The time-domain signal generated by the ifftN functions is stored in the arrays real_output and imag_output. The array real_output contains the real component of the complex output signal, and the array imag_output contains the imaginary component. The output is scaled by N, the number of points in the inverse FFT. The functions return a pointer to the real_output array.

Can you please have a quick look into the attached code and image files, I think this might help you.

Regards,

Jithul