title: FFT with iOS vDSP not symmetrical
body: <p>I'm using Apples vDSP APIs to calculate the FFT of audio.  However, my results (in <code>amp[]</code>) aren't symmetrical around N/2, which they should be, from my understanding of FFTs on real inputs?</p>
  
  <p>In the below <code>frame</code> is an array[128] of floats containing the audio samples.</p>
  
  <pre><code>        int numSamples = 128;
          vDSP_Length log2n = log2f(numSamples);
          FFTSetup fftSetup = vDSP_create_fftsetup(log2n, FFT_RADIX2);
          int nOver2 = numSamples/2;
  
          COMPLEX_SPLIT A;
          A.realp = (float *) malloc(nOver2*sizeof(float));
          A.imagp = (float *) malloc(nOver2*sizeof(float));
  
          vDSP_ctoz((COMPLEX*)frame, 2, &amp;A, 1, nOver2);
  
          //Perform FFT using fftSetup and A
          //Results are returned in A
          vDSP_fft_zrip(fftSetup, &amp;A, 1, log2n, FFT_FORWARD);
  
          //Convert COMPLEX_SPLIT A result to float array to be returned
          float amp[numSamples];
          amp[0] = A.realp[0]/(numSamples*2);
          for(int i=1;i&lt;numSamples;i++) {
              amp[i]=A.realp[i]*A.realp[i]+A.imagp[i]*A.imagp[i];
              printf("%f ",amp[i]);
          }
  </code></pre>
  
  <p>If I put the same float array into an online FFT calculator I do get a symmetrical output.  Am I doing something wrong above?</p>
  
  <p>For some reason, most values in <code>amp[]</code> are around 0 to 1e-5, but I also get one huge value of about 1e23.  I'm not doing any windowing here, just trying to get a basic FFT working initially.</p>
  
  <p>I've attached a picture of the two FFT outputs, using the same data. You can see they are similar upto 64, although not by a constant scaling factor, so I'm not sure what they are different by.  Then over 64 they are completely different.  </p>
  
  <p><img src="https://i.stack.imgur.com/wazHk.png" alt="enter image description here"></p>