title: How to write array of float values to audio file in Core Audio?
body: <p>I am trying to implement linear convolution using Core Audio, I have the algorithm implemented and working, but I am trying to write the output of this into a .wav audio file. Here is the code for the algorithm...</p>
  
  <pre><code>    //Create array containing output of convolution (size of array1 + array2 - 1)
  float *COutput;
  
  COutput = (float *)malloc(((size1+size2)-1)* sizeof(float));
  
  int sizeOutput = ((size1 + size2)-1);
  
  
  //Convolution Algorithm!!!
  
  for (i=0; i&lt;sizeOutput; i++) {
  
      COutput[i]=0;
  
      for (j=0; j&lt;sizeCArray1; j++) {
  
          if (((i-j)+1) &gt; 0) {
              COutput[i] += CArray1[i - j] * CArray2[j];
          }
  
      }
  
  }
  </code></pre>
  
  <p>I need to write the float values within COutput (a standard array of floats) into an audio file. Am I right in assuming I need to send these float values to an AudioBuffer within an AudioBufferList initially? Or is there a simple way of doing this?</p>
  
  <p>Many thanks for any help or guidance!</p>