title: AVAudioEngine separate channels
body: <p>I have a stereo audio file for which I try to separate the audio channels. Resulting in a bus with the left audio, and a bus with the right audio signal. On these channels I want to do some operations and then merge them again to a single stereo signal.</p>
  
  <p>Reading the audio file, doing operations on the bus and merging it to a single signal is no problem (though I haven't tested if this signal is stereo, as it depends on the prior channels I guess).</p>
  
  <p>My problem is in separating the left and the right channel, so I can independently modify them. </p>
  
  <p>One of my ideas was to use the <code>pan</code>property of <code>AVAudioPlayerNode</code> to have the signal only left/right, but it seems like (as mentioned in the documentation) this property is not yet implemented in the <code>AVAudioPlayerNode</code> (Even though in all the examples of the WWDC videos it is used).</p>
  
  <p>Another solution I found was <a href="https://stackoverflow.com/questions/27250317/avaudioengine-playing-multi-channel-audio">this</a>. Using <code>memcpy</code> to create new buffers. I haven't tried this yet as I guess this takes quite some time and is not suitable for a normal player.</p>
  
  <p>Third there is a framework called <a href="http://audiokit.io/" rel="nofollow noreferrer">audiokit</a>. This provides the option of converting the stream to mono left/right channel and then merging the signal again by creating an <code>AKStereoOperation</code>. My problem with this solution is, it is quite a simple use-case. Separating the audio channels. For this I find it hard to justify including such a huge framework, even though it would probably work (not tested).</p>
  
  <p>Is there a simple way to separate the channels?</p>
  
  <p>Thanks!</p>