GainNode class

The 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 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 AudioParam interface.

EventTarget

AudioNode

GainNode

Number of inputs 1

Number of outputs 1

Channel count mode "max"

Channel count 2 (not used in the default count mode)

Channel interpretation "speakers"

Implemented types
Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

GainNode(BaseAudioContext context, [GainOptions? options])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited