AudioContext class
The interface represents an audio-processing graph built from audio modules linked together, each represented by an AudioNode. An audio context controls both the creation of the nodes it contains and the execution of the audio processing, or decoding. You need to create an before you do anything else, as everything happens inside a context. It's recommended to create one AudioContext and reuse it instead of initializing a new one each time, and it's OK to use a single for several different audio sources and pipeline concurrently.
EventTarget
BaseAudioContext
AudioContext
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- AudioContext([AudioContextOptions? contextOptions])
-
factory
Properties
- audioWorklet → AudioWorklet
-
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
no setter - baseLatency → double
-
Available on AudioContext, provided by the PropsAudioContext extension
no setter - currentTime → double
-
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
no setter - destination → AudioDestinationNode
-
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- listener → AudioListener
-
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
no setter -
onstatechange
↔ EventHandlerNonNull<
Event> ? -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
getter/setter pair - outputLatency → double
-
Available on AudioContext, provided by the PropsAudioContext extension
no setter - renderCapacity → AudioRenderCapacity
-
Available on AudioContext, provided by the PropsAudioContext extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → double
-
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
no setter - state → AudioContextState
-
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
no setter
Methods
-
addEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
close(
) → Future< void> -
Available on AudioContext, provided by the PropsAudioContext extension
-
createAnalyser(
) → AnalyserNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createBiquadFilter(
) → BiquadFilterNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createBuffer(
int numberOfChannels, int length, double sampleRate) → AudioBuffer -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createBufferSource(
) → AudioBufferSourceNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createChannelMerger(
[int? numberOfInputs = 6]) → ChannelMergerNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createChannelSplitter(
[int? numberOfOutputs = 6]) → ChannelSplitterNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createConstantSource(
) → ConstantSourceNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createConvolver(
) → ConvolverNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createDelay(
[double? maxDelayTime = 1.0]) → DelayNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createDynamicsCompressor(
) → DynamicsCompressorNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createGain(
) → GainNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createIIRFilter(
Iterable< double> feedforward, Iterable<double> feedback) → IIRFilterNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createMediaElementSource(
HTMLMediaElement mediaElement) → MediaElementAudioSourceNode -
Available on AudioContext, provided by the PropsAudioContext extension
-
createMediaStreamDestination(
) → MediaStreamAudioDestinationNode -
Available on AudioContext, provided by the PropsAudioContext extension
-
createMediaStreamSource(
MediaStream mediaStream) → MediaStreamAudioSourceNode -
Available on AudioContext, provided by the PropsAudioContext extension
-
createMediaStreamTrackSource(
MediaStreamTrack mediaStreamTrack) → MediaStreamTrackAudioSourceNode -
Available on AudioContext, provided by the PropsAudioContext extension
-
createOscillator(
) → OscillatorNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createPanner(
) → PannerNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createPeriodicWave(
Iterable< double> real, Iterable<double> imag, [PeriodicWaveConstraints? constraints]) → PeriodicWave -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createScriptProcessor(
[int? bufferSize = 0, int? numberOfInputChannels = 2, int? numberOfOutputChannels = 2]) → ScriptProcessorNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createStereoPanner(
) → StereoPannerNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
createWaveShaper(
) → WaveShaperNode -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
decodeAudioData(
ByteBuffer audioData, [DecodeSuccessCallback? successCallback, DecodeErrorCallback? errorCallback]) → Future< AudioBuffer> -
Available on BaseAudioContext, provided by the PropsBaseAudioContext extension
-
dispatchEvent(
Event event) → bool -
Available on EventTarget, provided by the PropsEventTarget extension
-
getOutputTimestamp(
) → AudioTimestamp -
Available on AudioContext, provided by the PropsAudioContext extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
resume(
) → Future< void> -
Available on AudioContext, provided by the PropsAudioContext extension
-
suspend(
) → Future< void> -
Available on AudioContext, provided by the PropsAudioContext extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited