iOS FFT Accerelate.framework draw spectrum during playback

后端 未结 1 1262

UPDATE 2016-03-15

Please take a look at this project: https://github.com/ooper-shlab/aurioTouch2.0-Swift. It has been ported to Swift and contains every answer you\'re

相关标签:
1条回答
  • 2021-01-30 12:37

    Firstly you're not applying a window function prior to the FFT - this will result in smearing of the spectrum due to spectral leakage.

    Secondly, you're just using the real component of the FFT output bins to calculate dB magnitude - you need to use the complex magnitude:

    magnitude_dB = 10 * log10(re * re + im * im);
    
    0 讨论(0)
提交回复
热议问题