Web Audio API
The parameterDescriptors static property of an AudioWorkletProcessor-derived class is an iterable of AudioParamDescriptor-based objects.
The property is not a part of the AudioWorkletProcessor interface, but, if defined, it is read by AudioWorkletGlobalScope.registerProcessor to create a list of custom AudioParam objects in the AudioWorkletNode.parameters property of the associated AudioWorkletNode. It is never modified by built-in APIs, so it may be defined as a static getter.
Defining the property 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 the AudioWorkletNode.parameters property of the node, and under this name the AudioWorkletProcessor.process method will acquire the calculated values of thisAudioParam.
- : The string which represents the name of the
automationRateminValue- : A
floatwhich represents minimum value of theAudioParam. Defaults to-3.4028235e38.
- : A
maxValue- : A
floatwhich represents maximum value of theAudioParam. Defaults to3.4028235e38.
- : A
defaultValue- : A
floatwhich represents initial value of theAudioParam. Defaults to0.
- : A
Examples
See AudioWorkletNode.parameters for example code showing how to add static parameterDescriptors getter to a custom AudioWorkletProcessor.
Specifications
See also
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
