title: session.setPreferredInput in Swift?
body: <p>I am trying to set the preferred input to my AVAudioEngine. I have the following code:</p>
  
  <pre><code>var iphoneInput: AVAudioSessionPortDescription = AVAudioSession.sharedInstance().availableInputs[0] as! AVAudioSessionPortDescription
  
  var error: NSError?
  
  session.setPreferredInput(inPort: iphoneInput, error: error)
  </code></pre>
  
  <p>but Xcode keeps giving me errors for the last line stating taht it cannot invoke setPreferredinput with an arguement list of type '(AVAudioSessionPortDescription, NSError?)'  </p>
  
  <p>I am assuming it wants a NSErrorPointer for the error but I do not know how to create one in swift. Is this my problem and if so how do I create one? thanks!</p>