title: iOS kAudioFileUnsupportedDataFormatError while creating Audio File for recording
body: <p>I am using <code>ExtAudioFileCreateWithURL</code> and consistently get a runtime <code>kAudioFileUnsupportedDataFormatError</code> error when creating a Stereo LPCM Float32 Wave file. I insist that the same procedure works fine with a Mono (single channel) file. Any hints?</p>
  
  <p>Here's the code snippet:</p>
  
  <pre><code>let audioType: AudioFileTypeID = kAudioFileWAVEType 
  var recordingFormatStream = CAStreamBasicDescription(sampleRate: sampleRate, numChannels: 2, pcmf: .Float32, isInterleaved: false)!
  
  err = ExtAudioFileCreateWithURL(audioFileRecordingURL,
                                      audioType,
                                      &amp;recordingFormatStream,
                                      nil,
                                      AudioFileFlags.EraseFile.rawValue,
                                      &amp;audioRecordingAudioFile)
  </code></pre>
  
  <p>noting that <code>audioFileRecordingURL</code> and <code>audioRecordingAudioFile</code> are correctly typed and set.</p>
  
  <p>For the records, the <code>recordingFormatStream</code> contains:</p>
  
  <pre><code>mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsFloat | kAudioFormatFlagIsNonInterleaved
  mFormatID = kAudioFormatLinearPCM
  mSampleRate: 44100.0
  mBytesPerPacket: 4, mFramesPerPacket: 1, mBytesPerFrame: 4, mChannelsPerFrame: 2, mBitsPerChannel: 32, mReserved: 0
  </code></pre>
  
  <p>I insist that if I change the <code>numChannels</code> to 1, everything is fine! Using iOS 9.3 SDK.</p>