AudioWorklet

The AudioWorklet interface of the Web Audio API is used to supply custom audio processing scripts that execute in a separate thread to provide very low latency audio processing. Available only in secure contexts.

MDN Reference

Functions

Link copied to clipboard
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(module: M)
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(moduleURL: URL)
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(module: M, options: WorkletOptions)
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(moduleURL: URL, options: WorkletOptions)

inline suspend fun <M : WorkletModule> Worklet<M>.addModule(moduleURL: String)
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(moduleURL: String, options: WorkletOptions)

The addModule() method of the Worklet interface loads the module in the given JavaScript file and adds it to the current Worklet.

Link copied to clipboard
fun addModuleAsync(moduleURL: URL, options: WorkletOptions = definedExternally): Promise<Void?>

fun addModuleAsync(moduleURL: String, options: WorkletOptions = definedExternally): Promise<Void?>

The addModule() method of the Worklet interface loads the module in the given JavaScript file and adds it to the current Worklet.