title: Web Audio : Play stereo (2 channel) mp3 so only hear channel 1 in left ear and channel 2 in right
body: <p>I have a stereo mp3 file. Is it possible using Web Audio to play the file so that channel 1 is only heard through the left speaker and channel 2 is only heard through the right speaker?</p>
  <p>I've played with splitter, panner and merger nodes (channelCounts, Interpretation, CountMode) however the result always seem to be mixed somewhere e.g. if I attach a blank source as a second input to the merger, I still always hear channel 1 clearly in the right speaker.</p>
  <p>See below as an example I have tried - with various permutations of connect ins and outs.</p>
  <pre><code>audioCtx = new window.AudioContext();
  var source = audioCtx.createMediaElementSource(myAudio);  
  
  var blank = audioCtx.createBufferSource();
  
  var splitter = audioCtx.createChannelSplitter(2);
  source.connect(splitter);
  
  var panner = audioCtx.createPanner();
  panner.setPosition(-1,0,0);
  splitter.connect(panner, 0, 0);
  
  var merger = audioCtx.createChannelMerger(2);  
  panner.connect(merger, 0, 0);
  blank.connect(merger, 0, 1);
  
  merger.connect(audioCtx.destination);
  </code></pre>