You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: expected-errs.txt
+35-33Lines changed: 35 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -9,53 +9,55 @@ WARNING: Multiple elements have the same ID 'dom-decodeerrorcallback-error'.
9
9
Deduping, but this ID may not be stable across revisions.
10
10
WARNING: Multiple elements have the same ID 'dom-decodesuccesscallback-decodeddata'.
11
11
Deduping, but this ID may not be stable across revisions.
12
-
LINE 1904: Can't find the 'contextOptions' argument of method 'OfflineAudioContext/OfflineAudioContext(numberOfChannels, length, sampleRate)' in the argumentdef block.
13
-
LINE 2907: Can't find the 'destinationNode' argument of method 'AudioNode/connect(destinationParam, output)' in the argumentdef block.
14
-
LINE 2907: Can't find the 'input' argument of method 'AudioNode/connect(destinationParam, output)' in the argumentdef block.
15
-
LINE 3008: Can't find the 'destinationNode' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
16
-
LINE 3018: Can't find the 'destinationNode' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
17
-
LINE 3033: Can't find the 'destinationNode' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
18
-
LINE 3033: Can't find the 'input' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
12
+
LINE 1901: Can't find the 'contextOptions' argument of method 'OfflineAudioContext/OfflineAudioContext(numberOfChannels, length, sampleRate)' in the argumentdef block.
13
+
LINE 2900: Can't find the 'destinationNode' argument of method 'AudioNode/connect(destinationParam, output)' in the argumentdef block.
14
+
LINE 2900: Can't find the 'input' argument of method 'AudioNode/connect(destinationParam, output)' in the argumentdef block.
15
+
LINE 3001: Can't find the 'destinationNode' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
16
+
LINE 3011: Can't find the 'destinationNode' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
17
+
LINE 3026: Can't find the 'destinationNode' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
18
+
LINE 3026: Can't find the 'input' argument of method 'AudioNode/disconnect(destinationParam, output)' in the argumentdef block.
19
+
LINE 9887: Can't find method '['AudioWorkletProcessor/process(inputs, outputs, parameters))']'.
19
20
LINK ERROR: No 'idl-name' refs found for 'MediaStream'.
{{AudioWorkletNode}} and {{AudioWorkletProcessor}}.
9808
9808
</dl>
9809
9809
9810
-
<h5 id="defining-a-valid-audioworkletprocessor">
9811
-
Defining A Valid AudioWorkletProcessor</h5>
9810
+
<h5 id="AudioWorkletProcessor-methods">
9811
+
Methods</h5>
9812
9812
9813
9813
User can define a custom audio processor by extending
9814
9814
{{AudioWorkletProcessor}}. The subclass MUST define a method
9815
-
named <code><dfn id="audioworkletprocessor-process">process()</dfn></code> that implements the audio processing
9815
+
named {{process()}} that implements the audio processing
9816
9816
algorithm and have a valid static property named
9817
9817
<code><dfn>parameterDescriptors</dfn></code> which is an iterable
9818
9818
of {{AudioParamDescriptor}} that is looked up by the
@@ -9821,141 +9821,89 @@ of {{AudioParamDescriptor}} that is looked up by the
9821
9821
in the node. The <a href="#check-prototype-type">prototype type check step</a> and the <a href="#check-is-callable">process method is callable step</a> of <a data-link-for="AudioWorkletGlobalScope">registerProcessor()</a> ensure the
9822
9822
validity of a given {{AudioWorkletProcessor}} subclass.
1. The associated {{AudioWorkletProcessor}}'s <a>active
9863
-
source</a> flag is equal to `true`.
9830
+
The {{process()}} method is called
9831
+
synchronously by the audio <a>rendering thread</a> at
9832
+
every <a>render quantum</a>, if ANY of the following
9833
+
<dfn dfn>active processing conditions</dfn> are true:
9834
+
9835
+
1. The associated {{AudioWorkletProcessor}}'s
9836
+
<a>active source</a> flag is equal to `true`.
9837
+
9838
+
2. There are one or more connected inputs to the {{AudioWorkletNode}}.
9839
+
9840
+
The return value of this method controls the lifetime of the
9841
+
{{AudioWorkletProcessor}}'s associated
9842
+
{{AudioWorkletNode}}. At the conclusion of each call to the
9843
+
{{process()}} method, <a href="https://tc39.github.io/ecma262/#sec-toboolean"><code>ToBoolean</code></a> (described in [[!ECMASCRIPT]])
9844
+
is applied to the return value and the result is assigned to the associated AudioWorkletProcessor's <a>active source</a> flag. This in turn affects whether subsequent
9845
+
invocations of {{process()}} occur, and has an impact on the lifetime of the node.
9846
+
To propagate the flag change <a>queue a task</a> on the control thread to update the corresponding {{AudioWorkletNode}}'s <code>state</code> property accordingly.
9847
+
9848
+
<div class="note">
9849
+
This lifetime policy can support a variety of approaches found in
9850
+
built-in nodes, including the following:
9851
+
9852
+
* Nodes that transform their inputs, and are active only
9853
+
while connected inputs and/or script references exist. Such
9854
+
nodes SHOULD return <code>false</code> from
9855
+
{{process()}} which allows the presence or absence of
9856
+
connected inputs to determine whether active processing occurs.
9857
+
9858
+
* Nodes that transform their inputs, but which remain active
9859
+
for a <a>tail-time</a> after their inputs are disconnected. In
9860
+
this case, {{process()}} SHOULD return
9861
+
`true` for some period of time after
9862
+
<code>inputs</code> is found to contain zero channels. The
9863
+
current time may be obtained from the global scope's
9864
+
{{AudioWorkletGlobalScope/currentTime}} to
9865
+
measure the start and end of this tail-time interval, or the
9866
+
interval could be calculated dynamically depending on the
9867
+
processor's internal state.
9868
+
9869
+
* Nodes that act as sources of output, typically with a
9870
+
lifetime. Such nodes SHOULD return `true` from
9871
+
{{process()}} until the point at which they are no
9872
+
longer producing an output.
9873
+
9874
+
Note that the preceding definition implies that when no
9875
+
return value is provided from an implementation of
9876
+
{{process()}}, the effect is identical to returning
9877
+
<code>false</code> (since the effective return value is the falsy
9878
+
value <code>undefined</code>). This is a reasonable behavior for
9879
+
any {{AudioWorkletProcessor}} that is active only when it has
9880
+
active inputs.
9881
+
</div>
9864
9882
9865
-
2. There are one or more connected inputs to the
9866
-
{{AudioWorkletNode}}.
9883
+
If {{process()}} is not called during some rendering
9884
+
quantum due to the lack of any applicable [=active processing conditions=], the result is as if the processor emitted
9885
+
silence for this period.
9867
9886
9868
-
The method is invoked with the following arguments:
The input audio buffer from the incoming connections provided by the user agent. It has type <code><sequence<sequence<Float32Array>></code>. <code>inputs[n][m]</code> is a {{Float32Array}} of audio samples for the \(m\)th channel of the \(n\)th input. While the number of inputs is fixed at construction, the number of channels can be changed dynamically based on computedNumberOfChannels.
9869
9890
9870
-
: <code>inputs</code> of type <code>sequence<sequence<Float32Array>></code>
9871
-
::
9872
-
The input audio buffer from the incoming connections provided
9873
-
by the user agent. <code>inputs[n][m]</code> is a
9874
-
{{Float32Array}} of audio samples for the
9875
-
<code>m</code>th channel of <code>n</code>th input. While the
9876
-
number of inputs is fixed at construction, the number of
9877
-
channels can be changed dynamically based on
9878
-
<a>computedNumberOfChannels</a>.
9879
-
9880
-
If no connections exist to the <code>n</code>th input of the
9881
-
node during the current render quantum, then the content of
9882
-
<code>inputs[n]</code> is an empty array, indicating that
9883
-
zero channels of input are available. This is the only
9884
-
circumstance under which the number of elements of
9885
-
<code>inputs[n]</code> can be zero.
9886
-
9887
-
: <code>outputs</code> of type <code>sequence<sequence<Float32Array>></code>
9888
-
::
9889
-
The output audio buffer that is to be consumed by the user
9890
-
agent. <code>outputs[n][m]</code> is a
9891
-
{{Float32Array}} object containing the audio samples
9892
-
for <code>m</code>th channel of <code>n</code>th output. The
9893
-
number of channels in the output will match
9894
-
<a>computedNumberOfChannels</a> only when the node has single
9895
-
output.
9891
+
If no connections exist to the \(n\)th input of the node during the current render quantum, then the content of <code>inputs[n]</code> is an empty array, indicating that zero channels of input are available. This is the only circumstance under which the number of elements of <code>inputs[n]</code> can be zero.
9896
9892
9897
-
: <code>parameters</code> of type <code>Object</code>
9898
-
::
9899
-
A map of string keys and associated {{Float32Array}}s.
9900
-
<code>parameters["name"]</code> corresponds to the automation
9901
-
values of the {{AudioParam}} named
9902
-
<code>"name"</code>.
9903
-
9904
-
For each array, the array contains the [=computedValue=] or
9905
-
the parameter for all frames in the [=render quantum=].
9906
-
However, if no automation is scheduled during
9907
-
this [=render quantum=], the array MAY have length 1 with
9908
-
the array element being the constant value of the
9909
-
{{AudioParam}} for the [=render quantum=].
9910
-
9911
-
The return value of this method controls the lifetime of the
9912
-
{{AudioWorkletProcessor}}'s associated
9913
-
{{AudioWorkletNode}}. At the conclusion of each call to the
9914
-
<code>process()</code> method, <a href="https://tc39.github.io/ecma262/#sec-toboolean"><code>ToBoolean</code></a> (described in [[!ECMASCRIPT]])
9915
-
is applied to the return value and the result is assigned to the associated AudioWorkletProcessor's <a>active source</a> flag. This in turn affects whether subsequent
9916
-
invocations of <code>process()</code> occur, and has an impact on the lifetime of the node.
9917
-
To propagate the flag change <a>queue a task</a> on the control thread to update the corresponding {{AudioWorkletNode}}'s <code>state</code> property accordingly.
9893
+
outputs:
9894
+
The output audio buffer that is to be consumed by the user agent. It has type <code><sequence<sequence<Float32Array>></code>. <code>outputs[n][m]</code> is a {{Float32Array}} object containing the audio samples for \(m\)th channel of \(n\)th output. The number of channels in the output will match [=computedNumberOfChannels=] only when the node has single output.
9918
9895
9919
-
<div class="note">
9920
-
This lifetime policy can support a variety of approaches found in
9921
-
built-in nodes, including the following:
9922
-
9923
-
* Nodes that transform their inputs, and are active only
9924
-
while connected inputs and/or script references exist. Such
9925
-
nodes SHOULD return <code>false</code> from
9926
-
<code>process()</code> which allows the presence or absence of
9927
-
connected inputs to determine whether active processing occurs.
9928
-
9929
-
* Nodes that transform their inputs, but which remain active
9930
-
for a <a>tail-time</a> after their inputs are disconnected. In
9931
-
this case, <code>process()</code> SHOULD return
9932
-
`true` for some period of time after
9933
-
<code>inputs</code> is found to contain zero channels. The
9934
-
current time may be obtained from the global scope's
9935
-
{{AudioWorkletGlobalScope/currentTime}} to
9936
-
measure the start and end of this tail-time interval, or the
9937
-
interval could be calculated dynamically depending on the
9938
-
processor's internal state.
9939
-
9940
-
* Nodes that act as sources of output, typically with a
9941
-
lifetime. Such nodes SHOULD return `true` from
9942
-
<code>process()</code> until the point at which they are no
9943
-
longer producing an output.
9944
-
9945
-
Note that the preceding definition implies that when no
9946
-
return value is provided from an implementation of
9947
-
<code>process()</code>, the effect is identical to returning
9948
-
<code>false</code> (since the effective return value is the falsy
9949
-
value <code>undefined</code>). This is a reasonable behavior for
9950
-
any {{AudioWorkletProcessor}} that is active only when it has
9951
-
active inputs.
9952
-
</div>
9896
+
parameters:
9897
+
A map of string keys and associated {{Float32Array}}s. <code>parameters["name"]</code> corresponds to the automation values of the AudioParam named <code>"name"</code>.
9953
9898
9954
-
If <code>process()</code> is not called during some rendering
9955
-
quantum due to the lack of any applicable <a>active processing
9956
-
conditions</a>, the result is as if the processor emitted
9957
-
silence for this period.
9899
+
For each array, the array contains the [=computedValue=] or the parameter for all frames in the [=render quantum=]. However, if no automation is scheduled during this render quantum, the array MAY have length 1 with the array element being the constant value of the {{AudioParam}} for the [=render quantum=].
9900
+
</pre>
9958
9901
9902
+
<div>
9903
+
<em>Return type:</em>{{boolean}}
9904
+
</div>
9905
+
</dl>
9906
+
9959
9907
<h5 dictionary lt="AudioParamDescriptor">
9960
9908
{{AudioParamDescriptor}}</h5>
9961
9909
@@ -10723,8 +10671,7 @@ operation such as resolution of {{Promise}}s in the {{AudioWorkletGlobalScope}}.
10723
10671
<a href="#available-for-reading">make it available for reading</a>.
10724
10672
10725
10673
4. If this {{AudioNode}} is an {{AudioWorkletNode}}, invoke associated
0 commit comments