{{APIRef()}}
The ChannelMergerNode
interface, often used in conjunction with its opposite, {{domxref("ChannelSplitterNode")}}, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel.
If ChannelMergerNode
has one single output, but as many inputs as there are channels to merge; the amount of inputs is defined as a parameter of its constructor and the call to {{domxref("AudioContext.createChannelMerger")}}. In the case that no value is given, it will default to 6
.
Using a ChannelMergerNode
, it is possible to create outputs with more channels than the rendering hardware is able to process. In that case, when the signal is sent to the {{domxref("AudioContext.listener")}} object, supernumerary channels will be ignored.
- Number of inputs variable; default to
6
. - Number of outputs
1
- Channel count mode
"max"
- Channel count
2
(not used in the default count mode) - Channel interpretation
"speakers"
Properties
No specific property; inherits properties from its parent, {{domxref("AudioNode")}}.
Methods
No specific method; inherits methods from its parent, {{domxref("AudioNode")}}.
Example
{{page("/en-US/docs/Web/API/AudioContext.createChannelMerger","Example")}}
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-channelmergernode-interface', 'ChannelMergerNode')}} | {{Spec2('Web Audio API')}} |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(10.0)}}{{property_prefix("webkit")}} | {{CompatGeckoDesktop(25.0)}} | {{CompatNo}} | 15.0{{property_prefix("webkit")}} 22 (unprefixed) |
6.0{{property_prefix("webkit")}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | 26.0 | 1.2 | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | 33.0 |