iPhone FFT with Accelerate framework vDSP

前端 未结 3 1709
臣服心动
臣服心动 2020-12-23 15:49

I\'m having difficulty implementing an FFT using vDSP. I understand the theory but am looking for a specific code example please.

I have data from a wav file as bel

3条回答
  •  春和景丽
    2020-12-23 15:57

    One thing you need to be careful to is the DC component of the calculated FFT. I compared my results with the fftw library FFT and the imaginary part of the transform calculated with the vDSP library always had a different value at index 0 (which means 0 frequency, so DC). Another measure I applied was to divide both real and imaginary parts by a factor of 2. I guess this is due to the algorithm used in the function. Also, both these problems occurred in the FFT process but not in the IFFT process.

    I used vDSP_fft_zrip.

提交回复
热议问题