From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/api/audioparamdescriptor/index.html | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 files/zh-cn/web/api/audioparamdescriptor/index.html (limited to 'files/zh-cn/web/api/audioparamdescriptor/index.html') diff --git a/files/zh-cn/web/api/audioparamdescriptor/index.html b/files/zh-cn/web/api/audioparamdescriptor/index.html new file mode 100644 index 0000000000..4a204f868e --- /dev/null +++ b/files/zh-cn/web/api/audioparamdescriptor/index.html @@ -0,0 +1,50 @@ +--- +title: AudioParamDescriptor +slug: Web/API/AudioParamDescriptor +translation_of: Web/API/AudioParamDescriptor +--- +
{{APIRef("Web Audio API")}}
+ +

The AudioParamDescriptor dictionary of the Web Audio API specifies properties for an {{domxref("AudioParam")}} objects. It is used to create custom AudioParams on an {{domxref("AudioWorkletNode")}}. If the underlying {{domxref("AudioWorkletProcessor")}} has a {{domxref("AudioWorkletProcessor.parameterDescriptors", "parameterDescriptors")}} static getter, then the returned array of objects based on this dictionary is used internally by AudioWorkletNode constructor to populate its {{domxref("AudioWorkletNode.parameters", "parameters")}} property accordingly.

+ +

属性

+ +
+
name
+
The {{domxref("DOMString")}} which represents the name of the AudioParam. Under this name the AudioParam will be available in the {{domxref("AudioWorkletNode.parameters", "parameters")}} property of the node, and under this name the {{domxref("AudioWorkletProcessor.process")}} method will acquire the calculated values of this AudioParam.
+
automationRate {{optional_inline}}
+
Either "a-rate", or "k-rate" string which represents an automation rate of this AudioParam. Defaults to "a-rate".
+
minValue {{optional_inline}}
+
A float which represents minimum value of the AudioParam. Defaults to -3.4028235e38.
+
maxValue {{optional_inline}}
+
A float which represents maximum value of the AudioParam. Defaults to 3.4028235e38.
+
defaultValue {{optional_inline}}
+
A float which represents initial value of the AudioParam. Defaults to 0.
+
+ +

例子

+ +

{{page("/en-US/docs/Web/API/AudioWorkletNode/parameters", "Examples")}}

+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Web Audio API','#dictdef-audioparamdescriptor','AudioParamDescriptor')}}{{Spec2('Web Audio API')}}Initial definition.
+ +

浏览器兼容性

+ + + +

{{Compat("api.AudioParamDescriptor")}}

-- cgit v1.2.3-54-g00ecf