W3cubDocs

/Haxe JavaScript

OfflineAudioContext

package js.html.audio

extends BaseAudioContextEventTarget

Available on js

The OfflineAudioContext interface is an AudioContext interface representing an audio-processing graph built from linked together AudioNodes. In contrast with a standard AudioContext, an OfflineAudioContext doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an AudioBuffer.

Documentation OfflineAudioContext by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(numberOfChannels:Int, length:Int, sampleRate:Float)

new(contextOptions:OfflineAudioContextOptions)

Throws:

null

DOMError

Variables

read onlylength:Int

An integer representing the size of the buffer in sample-frames.

oncomplete:Function

Is an EventHandler called when processing is terminated, that is when the complete event (of type OfflineAudioCompletionEvent) is raised, after the event-based version of OfflineAudioContext.startRendering() is used.

Methods

startRendering():Promise<AudioBuffer>

Starts rendering the audio, taking into account the current connections and the current scheduled changes. This page covers both the event-based version and the promise-based version.

Throws:

null

DOMError

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/audio/OfflineAudioContext.html