Web Audio API: Pan audio (left/right) + controlling gain
I want to create a very basic AudioContext()-instance playing a sound either on the left or on the right channel.
I know, there is already an answer about this here: http://stackoverflow.com/a/20850704/1138860
My problem is, I have to control the gain via a GainNode. Whenever I conntect the GainNode, it makes the left/right channel to output sound again.
It looks like you connect the source to the gain node and then connect the gain node directly to the destination. So now your source is gets to the destination via the panner and the gain node. Connect your gain node to the panner instead of the destination. I think that will fix it.