Indie dev efficiency3 min read

Web Audio only plays on the right? Check ChannelMerger input indices

Use a mono impulse and a two-input merger to verify silent channel slots and connect argument order.

Web Audio only plays on the right? Check ChannelMerger input indices
Two output channels with a waveform in the lower channel and silence above
Concept illustration

If a mono UI sound reaches only the right ear after a ChannelMerger, inspect the destination input index first. This offline 48 kHz, two-channel fixture removes headphones and system balance from the test.

Trace a single mono connection

  1. Create a two-channel OfflineAudioContext and a mono buffer with a 0.5 impulse at sample 480. Make createChannelMerger(2) and connect it to the offline destination.
  2. Connect only source.connect(merger, 0, 1) and start the source. Those arguments mean destination node, source output index and destination input index. After rendering, sample 480 should be zero on channel 0 and 0.5 on channel 1.
  3. Build another source and context, changing the target input to zero. Expect the channels to swap. An unconnected input retains a silent output slot; a later input does not shift forward.

Check real assets after the fixture

Inspect the decoded channel count before replacing the impulse with your UI sound. Each merger input is downmixed to mono first, so feeding a stereo buffer into one input does not preserve its two original channels. Use Resource Compressor to compare delivery sizes and keep this offline fixture for verifying the audio graph.

Ready to try "Web Audio only plays on the right? Check ChannelMerger input indices"?

Use our online tools to apply this tutorial to your indie game project right away.