title: AudioKit swift panning
body: <p>Im currently developing an app with the help from audioKit. Im trying to pan the audio so it only plays in one ear at a time. Any ideas of what might be wrong?</p>
  <p>The sound is playing, but It plays simultaneously in both ears.</p>
  <pre><code>func createTone(freq: Double, dB: Int, isLeftEar: Bool){
          currentFreq = Int(freq)
          currentdB = dB
          isAudioOn = true
          osciliator.frequency = freq
          osciliator.amplitude = calculateVolume(dB: dB)
          osciliator.rampDuration = 0.25
          let leftPan = AKPanner(osciliator, pan: -1)
          let rightPan = AKPanner(osciliator, pan: 1)
          if(isLeftEar){
              AudioKit.AKManager.output = leftPan
              
          }else{
              
              AudioKit.AKManager.output = rightPan
          }
          do{
              try AudioKit.AKManager.start()
          }catch{
              print(&quot;could not start AudioKit.&quot;)
          }
          
          if isLeftEar {
              leftPan.start()
          }else{
              rightPan.start()
          }
          
          osciliator.start()
          sleep(2)
          
          do{
              try AudioKit.AKManager.stop()}
          catch{
              print(&quot;AudioKit could not stop&quot;)
          }
          
  </code></pre>