Your conclusion seems pretty reasonable, so I'm going to interpret your question as something more: "How to clear these results?"
1) You are probably using a rectangular window
This means that you are not doing windowing , which will result in some noise in your results. vDSP comes with some window execution features that you can use as follows:
// N = number of samples in your buffer int N = _audioSample.capacity(); // allocate space for a hamming window float * hammingWindow = (float *) malloc(sizeof(float) * N); // generate the window values and store them in the hamming window buffer vDSP_hamm_window(hammingWindow, N, 0);
Then, whenever you are going to make your FFT, first open your samples (like, do this before calling vDSP_ctoz):
vDSP_vmul(sample.get(), 1, hammingWindow, 1, sample.get(), 1, N);
2) You might want to run the amplitude function according to your results.
This will give you results similar to those you will see in the standard FFT line chart visualization visualization tool. Do it after FFT:
vDSP_zvmags(&_complex, 1, &_complex.realp, 1, _fftsize);
After that, _complex.realp will be an array of float values โโrepresenting the size of each FFT bit.