title: Converting AVAudioRecorder input to buffer of floats
body: <p>Apologies in advance for the noobiness of this question, this is my first exploration of the audio side of iOS programming.</p>
  
  <p>I'm using the AVAudioRecorder class to record input through the microphone, using the following settings dictionary.</p>
  
  <pre><code>NSMutableDictionary *settings = [[NSMutableDictionary alloc] init];
  [settings setValue:[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
  [settings setValue:[NSNumber numberWithFloat:11025.0] forKey:AVSampleRateKey];
  [settings setValue:[NSNumber numberWithInt: 1] forKey:AVNumberOfChannelsKey];
  [settings setValue:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
  [settings setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
  [settings setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
  </code></pre>
  
  <p>It works absolutely fine, the problem comes however when I attempt to use the echonest-codegen library to generate a fingerprint to identify the music played in.</p>
  
  <p>Don't worry, if you've never used it before, basically I have to run this function:</p>
  
  <pre><code>Codegen * pCodegen = new Codegen(const float* pcm[], int number_of_samples, int samples_offset);
  </code></pre>
  
  <p>Where const float* pcm[] is a buffer of samples. I need to convert my input to a "buffer of floats". I've been pointed towards the ExtAudioFile docs, but they're not making an awful lot of sense. Could anybody point me in the right direction? I'm utterly lost!</p>
  
  <p>Many Thanks!</p>