AudioWorkletNodeOptions
dictionary of the
Web 音频 API
is used to specify configuration options when constructing a new
AudioWorkletNode
object for custom audio processing.
It is only used when calling the
AudioWorkletNode()
constructor. During internal instantiation of the underlying
AudioWorkletProcessor
,
the structured clone algorithm
is applied to the options object and the result is passed into
AudioWorkletProcessor
的构造函数。
numberOfInputs
可选
numberOfInputs
property to. Defaults to 1.
numberOfOutputs
可选
numberOfOutputs
property to. Defaults to 1.
outputChannelCount
可选
numberOfOutputs
.
parameterData
可选
AudioParam
objects on this node (in its
参数
property), with
key
being the name of a custom parameter and
value
being its initial value.
processorOptions
可选
AudioWorkletProcessor
.
When creating an
AudioWorkletNode
, these options can have various effects. If the number of inputs and number of outputs are both set to 0, a
NotSupportedError
will be thrown and the node construction process aborted. If the length of the
outputChannelCount
array doesn't match
numberOfOutputs
,
IndexSizeError
will be thrown.
若
outputChannelCount
isn't specified, and
numberOfInputs
and
numberOfOutputs
are both 1, the
AudioWorkletNode
's initial channel count is set to 1. This has the effect of changing the output channel count to dynamically change to the computed number of channels, based on the input's channel count and the current setting of the
AudioNode
property
channelCountMode
.
否则,若
outputChannelCount
is provided
and
if the values of
numberOfInputs
and
numberOfOutputs
are both 1, the audio worklet node's channel count is set to the value of
outputChannelCount
. Otherwise, the channel count of each channel in the set of output channels is set to match the corresponding value in the
outputChannelCount
数组。
// FILL IN EXAMPLE SNIPPET
| 规范 | 状态 | 注释 |
|---|---|---|
|
Web 音频 API
The definition of 'AudioWorkletNodeOptions' in that specification. |
工作草案 | 初始定义。 |
No compatibility data found. Please contribute data for "api.AudioWorkletNodeOptions" (depth: 1) to the MDN 兼容性数据存储库 .
AudioWorkletNodeOptions
AnalyserNode
AudioBuffer
AudioBufferSourceNode
AudioContext
AudioContextOptions
AudioDestinationNode
AudioListener
AudioNode
AudioNodeOptions
AudioParam
AudioProcessingEvent
AudioScheduledSourceNode
AudioWorklet
AudioWorkletGlobalScope
AudioWorkletNode
AudioWorkletProcessor
BaseAudioContext
BiquadFilterNode
ChannelMergerNode
ChannelSplitterNode
ConstantSourceNode
ConvolverNode
DelayNode
DynamicsCompressorNode
GainNode
IIRFilterNode
MediaElementAudioSourceNode
MediaStreamAudioDestinationNode
MediaStreamAudioSourceNode
OfflineAudioCompletionEvent
OfflineAudioContext
OscillatorNode
PannerNode
PeriodicWave
StereoPannerNode
WaveShaperNode