OfflineAudioContext

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.

MDN Reference

Constructors

Link copied to clipboard
constructor(numberOfChannels: Int, length: Int, sampleRate: Float)
constructor(contextOptions: OfflineAudioContextOptions)

Properties

Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun createBuffer(numberOfChannels: Int, length: Int, sampleRate: Float): AudioBuffer
Link copied to clipboard
fun createChannelMerger(numberOfInputs: Int = definedExternally): ChannelMergerNode
Link copied to clipboard
fun createChannelSplitter(numberOfOutputs: Int = definedExternally): ChannelSplitterNode
Link copied to clipboard
fun createDelay(maxDelayTime: Double = definedExternally): DelayNode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback? = definedExternally, errorCallback: DecodeErrorCallback? = definedExternally): AudioBuffer
Link copied to clipboard
fun decodeAudioDataAsync(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback? = definedExternally, errorCallback: DecodeErrorCallback? = definedExternally): Promise<AudioBuffer>
Link copied to clipboard
Link copied to clipboard
suspend fun resume()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun suspend(suspendTime: Double)
Link copied to clipboard
fun suspendAsync(suspendTime: Double): Promise<Void>