Table of Contents

Class AudioWorklet

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

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.

[Value("AudioWorklet")]
public class AudioWorklet : Worklet
Inheritance
AudioWorklet
Inherited Members

Remarks

The worklet's code is run in the AudioWorkletGlobalScope global execution context, using a separate Web Audio thread which is shared by the worklet and other audio nodes.

Access the audio context's instance of AudioWorklet through the AudioWorklet property.

-AudioWorkletGlobalScope — the global execution context of an AudioWorklet
-Web Audio API
-Using the Web Audio API
-Using AudioWorklet

See also on MDN

Constructors

AudioWorklet()

public AudioWorklet()

Properties

Port

NOTE
Experimental
The port read-only property of the AudioWorklet interface returns a MessagePort object that can be used to send and receive messages between the main thread and the associated AudioWorkletGlobalScope.
[Value("port")]
public MessagePort Port { get; }

Property Value

MessagePort

The MessagePort object connecting the AudioWorklet and its associated AudioWorkletGlobalScope.

Remarks

This allows for custom, asynchronous communication between code in the main thread and the global scope of an audio worklet, such as receiving control data or global settings.

-AudioWorkletGlobalScope — the global execution context of an AudioWorklet
-Web Audio API
-Using the Web Audio API
-Using AudioWorklet

See also on MDN