Reputation: 711
I have one problem. I'm using NAudio, on C#. My Sample rate = 40960. My microphone, give me buffer every 100ms(4096 bytes). I send this to fft. If I look to only 4096 elements, correct to say about sound frequency more than 2048 Hz? Or I need to use for this buffer size more than this?
Upvotes: 1
Views: 1076
Reputation: 213170
Your sample rate, Fs = 40960 Hz, therefore your FFT will represent real positive frequencies from 0 to Fs / 2 (Nyquist) = 0 Hz to 20480 Hz.
The resolution of your FFT is Fs / N = 40960 / 4096 = 10 Hz. So each bin is 10 Hz wide, and the first 2048 complex output bins represents frequencies from 0 to 20480 Hz in 10 Hz increments (you can ignore the other 2048 output bins since they contain no additional information for a purely real input signal).
For a more complete explanation see this answer.
Upvotes: 4