AudioWorkletNode Class

A node whose processing is implemented by a script (https://webaudio.github.io/web-audio-api/#AudioWorkletNode): its AudioWorkletProcessor, registered in the BaseAudioContext.AudioWorklet of its context.

public sealed class AudioWorkletNode : AudioNode

Remarks

The processor is constructed by a task queued by the constructor of the node, and its process() method is called during the rendering of each render quantum while the node is actively processing, on the thread of the event loop.

See also

Inheritance
AudioNode AudioWorkletNode

Constructors

NameDescription
AudioWorkletNode(BaseAudioContext, string, AudioWorkletNodeOptions?)Creates a node of a processor registered in the audio worklet of the context.

AudioWorkletNode(BaseAudioContext, string, AudioWorkletNodeOptions?)

AudioWorkletNode.cs

Creates a node of a processor registered in the audio worklet of the context.

public AudioWorkletNode(BaseAudioContext context, string name, AudioWorkletNodeOptions? options = null)

Parameters

context BaseAudioContext
name string
options AudioWorkletNodeOptions?

Exceptions

DomException
The processor is not registered (an InvalidStateError), the numbers of inputs and outputs are both 0 or an output channel count is not supported (a NotSupportedError), or the output channel counts do not match the outputs (an IndexSizeError).

See also

Properties

NameDescription
OnProcessorErrorGets or sets the event handler of the processorerror event.
ParametersGets the parameters of the processor.
PortGets the port connected to the port of the processor.

OnProcessorError

AudioWorkletNode.cs

Gets or sets the event handler of the processorerror event.

public Action<Event>? OnProcessorError { get; set; }

Gets the parameters of the processor.

public AudioParamMap Parameters { get; }

Gets the port connected to the port of the processor.

public MessagePort Port { get; }