title: AudioKit iOS Setting Input and Output devices
body: <p>Have an app that can record audio and play it with another audio simultaneously.</p>
  
  <p>What I Want: To be able to switch Audio Input And Output devices. For example. Record Audio from iPhone build in mic and listen audio through wired or bluetooth headphones. and vice versa</p>
  
  <p>What am I trying to do:</p>
  
  <pre><code>            do {
                  print("Seted Input:\(String(describing: AudioKit.inputDevice))")
                  if let inputs = AudioKit.inputDevices {
                      print("Selected Input:\(String(describing: [indexPath.row]))")
                      try AudioKit.setInputDevice(inputs[indexPath.row])
                      try PlayerManager.sharedInstance.mic.setDevice(inputs[indexPath.row])
                      print("Selected Input:\(String(describing: AudioKit.inputDevice))")
                  }
              } catch let error as NSError{
                  print(error)
              }
  </code></pre>
  
  <p>Result: </p>
  
  <pre><code>Seted Input:Optional(&lt;Device: Микрофон гарнитуры (Wired Microphone)&gt;)
  Selected Input:&lt;Device: iPhone Микрофон (Built-In Microphone Снизу)&gt;
  Selscted Input:Optional(&lt;Device: Микрофон гарнитуры (Wired Microphone)&gt;)
  Selected Output:Optional(&lt;Device: Наушники (Wired Headphones)&gt;)
  </code></pre>
  
  <p>Question: How to properly set input device with AudioKit.</p>
  
  <p>I'am using xCode 9.3 (9E145) and AudioKit (4.2.1)</p>
  
  <p>P.S It would be great if some one help me with output setting too.
  AudioKit.outputDevices always return 1 device to me, even if bluetooth and wired headphones connected</p>