GainNode interface represents a change in volume. It is an
AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A
GainNode always has exactly one input and one output, both with the same number of channels.
The gain is a unitless value, changing with time, that is multiplied to each corresponding sample of all input channels. If modified, the new gain is instantly applied, causing unaesthetic 'clicks' in the resulting audio. To prevent this from happening, never change the value directly but use the exponential interpolation methods on the
|Number of inputs||
|Number of outputs||
|Channel count mode||
Creates and returns a new
GainNodeobject. As an alternative, you can use the
BaseAudioContext.createGain()factory method; see Creating an AudioNode.
Inherits properties from its parent,
AudioParamrepresenting the amount of gain to apply. You have to set
AudioParam.valueor use the methods of
AudioParamto change the effect of gain.
No specific method; inherits methods from its parent,
BaseAudioContext.createGain() for example code showing how to use an
AudioContext to create a
|Web Audio API |
BCD tables only load in the browser