AudioWorkletProcessor: parameterDescriptors static property
The read-only parameterDescriptors property of an AudioWorkletProcessor-derived class is a static getter,
which returns an iterable of AudioParamDescriptor-based objects.
The property is not a part of the AudioWorkletProcessor
interface, but, if defined, it is called internally by the
AudioWorkletProcessor constructor to create a list of custom
AudioParam objects in the parameters property of the associated AudioWorkletNode.
Defining the getter is optional.
Value
An iterable of AudioParamDescriptor-based objects. The properties of
these objects are as follows:
name-
The string which represents the name of the
AudioParam. Under this name theAudioParamwill be available in theparametersproperty of the node, and under this name theAudioWorkletProcessor.processmethod will acquire the calculated values of thisAudioParam. automationRateOptional-
Either
"a-rate", or"k-rate"string which represents an automation rate of thisAudioParam. Defaults to"a-rate". minValueOptional-
A
floatwhich represents minimum value of theAudioParam. Defaults to-3.4028235e38. maxValueOptional-
A
floatwhich represents maximum value of theAudioParam. Defaults to3.4028235e38. defaultValueOptional-
A
floatwhich represents initial value of theAudioParam. Defaults to0.
Examples
See AudioWorkletNode.parameters for example code showing how to add static parameterDescriptors getter to a custom AudioWorkletProcessor.
Specifications
| Specification |
|---|
| Web Audio API> # audioworkletprocess-callback-parameters> |