- While using FFT sample code from Apple documentation, what actually does the N, log2n, n and nOver2 mean?
- Does N refer to the window size of the fft or the whole number of samples in a given audio, and
- how do I calculate N from an audio file?
- how are they related to the audio sampling rate i.e. 44.1kHz?
- What would be the FFT frame size in this code?
Code:
/* Set the size of FFT. */
log2n = N;
n = 1 << log2n;
stride = 1;
nOver2 = n / 2;
printf("1D real FFT of length log2 ( %d ) = %d\n\n", n, log2n);
/* Allocate memory for the input operands and check its availability,
* use the vector version to get 16-byte alignment. */
A.realp = (float *) malloc(nOver2 * sizeof(float));
A.imagp = (float *) malloc(nOver2 * sizeof(float));
originalReal = (float *) malloc(n * sizeof(float));
obtainedReal = (float *) malloc(n * sizeof(float));