Extends
Implements
Members
Get AudioContext class, if not supported returns null
Get OfflineAudioContext class, if not supported returns null
Context Analyser node
The WebAudio API AudioContext object.
Set to false ignore suspending when window is blurred
- Default Value:
- true
Context Compressor node
Handle global events
Sets the muted state.
- Default Value:
- false
The WebAudio API OfflineAudioContext object.
Pauses all sounds, even though we handle this at the instance
level, we'll also pause the audioContext so that the
time used to compute progress isn't messed up.
The audioContext follows the last value set, including when
it's changed more than once in the same tick.
While not paused, a context stopped by the browser is resumed on the next tap,
including one stopped by calling audioContext.suspend() directly. Use paused or
pauseAll() to pause.
- Default Value:
- false
Global speed of all sounds
Sets the volume from 0 to 1.
- Default Value:
- 1
Methods
Decode the audio data
| Name | Type | Description |
|---|---|---|
arrayBuffer |
ArrayBuffer |
Buffer from loader |
callback |
(err: Error, buffer: AudioBuffer) => void |
Called once when decoding finishes, with the browser's error or the decoded buffer. |
destroy () void overrides
Destroy this context.
Plays an empty sound in the web audio context. This is used to enable web audio on iOS devices, as they require the first sound to be played inside of a user initiated event (touch/click). If the context is paused, it's suspended again as soon as it has started.
Emit event when muted, volume or speed changes
Emit event when muted, volume or speed changes
Toggles the muted state.
Returns:
| Type | Description |
|---|---|
| boolean | The current muted state. |
Toggles the paused state.
Returns:
| Type | Description |
|---|---|
| boolean | The current muted state. |
Inherited Properties
From class Filterable
destination AudioNode inherited
The destination output audio node
filters filters.Filter[] inherited
The collection of filters.