AudioContext

open external class AudioContext(contextOptions: AudioContextOptions = definedExternally) : BaseAudioContext(source)

An audio-processing graph built from audio modules linked together, each represented by an AudioNode.

MDN Reference

Constructors

Link copied to clipboard
constructor(contextOptions: AudioContextOptions = definedExternally)

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
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun close()
Link copied to clipboard
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
fun createPeriodicWave(real: Float32Array<*>, imag: Float32Array<*>, constraints: PeriodicWaveConstraints = definedExternally): PeriodicWave

fun createPeriodicWave(real: ReadonlyArray<Double>, imag: ReadonlyArray<Double>, constraints: PeriodicWaveConstraints = definedExternally): PeriodicWave
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
suspend fun suspend()
Link copied to clipboard