title: stereo recording on iPhone
body: <p>The iPhone 5 has three microphones - top front, top back, and bottom.  I would like to record on all of them at the same time to do some signal processing.  I've tried for several days unsuccessfully.</p>
  
  <p>Using AVAudioSession, I can see the microphones:</p>
  
  <pre><code>NSLog(@"%@", [AVAudioSession sharedInstance].availableInputs);
  
    "&lt;AVAudioSessionPortDescription: 0x14554400, type = MicrophoneBuiltIn; name = iPhone Microphone; UID = Built-In Microphone; selectedDataSource = Back&gt;"
  
  NSLog(@"%@", [AVAudioSession sharedInstance].availableInputs[0].inputDataSources);
  
    "&lt;AVAudioSessionDataSourceDescription: 0x145afb00, ID = 1835216945; name = Bottom&gt;",
    "&lt;AVAudioSessionDataSourceDescription: 0x145b1870, ID = 1835216946; name = Front&gt;",
    "&lt;AVAudioSessionDataSourceDescription: 0x145b3650, ID = 1835216947; name = Back&gt;"
  </code></pre>
  
  <p>I can use AVAudioSessionPortDescription <code>-setPreferredDataSource:error:</code> to record from one of the three. But I cannot record on more than one simultaneously. If I set the number of input channels to 2, I get two identical tracks from the same microphone.</p>
  
  <p>AVAudioRecorder has a property <code>channelAssignments</code> which seems like it should work, but AVAudioSession <code>inputNumberOfChannels</code> and <code>maximumInputNumberOfChannels</code> are both 1.  The property <code>channelAssignments</code> is designed for auxiliary microphones which have multiple channels.</p>
  
  <p>I tried using the low-level AudioUnit, but I get the same result.  I could not find any properties on AudioUnit to change the input source.</p>
  
  <p>Any help would be appreciated.</p>