Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,5 +1,29 @@
2020-07-29 Clark Wang <clark_w...@apple.com>
+ Added constructor methods to ChannelMergerNode, ChannelSplitterNode
+ https://bugs.webkit.org/show_bug.cgi?id=214851
+ <rdar://problem/66233763>
+
+ Reviewed by Chris Dumez.
+
+ Re-baselined existing tests that now pass, or fail due to a different interface.
+
+ * web-platform-tests/webaudio/idlharness.https.window-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt:
+
+2020-07-29 Clark Wang <clark_w...@apple.com>
+
Added copyFromChannel, copyToChannel to AudioBuffer
https://bugs.webkit.org/show_bug.cgi?id=214926
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -501,67 +501,67 @@
FAIL AudioNode interface: new BiquadFilterNode(context) must inherit property "channelCountMode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new BiquadFilterNode(context)')"
FAIL AudioNode interface: new BiquadFilterNode(context) must inherit property "channelInterpretation" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new BiquadFilterNode(context)')"
PASS ChannelMergerNode interface: existence and properties of interface object
-FAIL ChannelMergerNode interface object length assert_equals: wrong value for ChannelMergerNode.length expected 1 but got 0
+PASS ChannelMergerNode interface object length
PASS ChannelMergerNode interface object name
PASS ChannelMergerNode interface: existence and properties of interface prototype object
PASS ChannelMergerNode interface: existence and properties of interface prototype object's "constructor" property
PASS ChannelMergerNode interface: existence and properties of interface prototype object's @@unscopables property
-FAIL ChannelMergerNode must be primary interface of new ChannelMergerNode(context) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL Stringification of new ChannelMergerNode(context) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling connect(AudioParam, optional unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling disconnect(unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioParam) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "context" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfInputs" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfOutputs" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCount" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCountMode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
-FAIL AudioNode interface: new ChannelMergerNode(context) must inherit property "channelInterpretation" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context)')"
+PASS ChannelMergerNode must be primary interface of new ChannelMergerNode(context)
+PASS Stringification of new ChannelMergerNode(context)
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type
+PASS AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type
+PASS AudioNode interface: calling connect(AudioParam, optional unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect()" with the proper type
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioNode) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioParam) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "context" with the proper type
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfInputs" with the proper type
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfOutputs" with the proper type
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCount" with the proper type
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCountMode" with the proper type
+PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "channelInterpretation" with the proper type
PASS ChannelSplitterNode interface: existence and properties of interface object
-FAIL ChannelSplitterNode interface object length assert_equals: wrong value for ChannelSplitterNode.length expected 1 but got 0
+PASS ChannelSplitterNode interface object length
PASS ChannelSplitterNode interface object name
PASS ChannelSplitterNode interface: existence and properties of interface prototype object
PASS ChannelSplitterNode interface: existence and properties of interface prototype object's "constructor" property
PASS ChannelSplitterNode interface: existence and properties of interface prototype object's @@unscopables property
-FAIL ChannelSplitterNode must be primary interface of new ChannelSplitterNode(context) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL Stringification of new ChannelSplitterNode(context) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling connect(AudioParam, optional unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling disconnect(unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioParam)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioParam) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "context" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "numberOfInputs" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "numberOfOutputs" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelCount" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelCountMode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
-FAIL AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelInterpretation" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context)')"
+PASS ChannelSplitterNode must be primary interface of new ChannelSplitterNode(context)
+PASS Stringification of new ChannelSplitterNode(context)
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type
+PASS AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type
+PASS AudioNode interface: calling connect(AudioParam, optional unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect()" with the proper type
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioNode) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioParam)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioParam) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type
+PASS AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "context" with the proper type
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "numberOfInputs" with the proper type
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "numberOfOutputs" with the proper type
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelCount" with the proper type
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelCountMode" with the proper type
+PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelInterpretation" with the proper type
FAIL ConstantSourceNode interface: existence and properties of interface object assert_own_property: self does not have own property "ConstantSourceNode" expected property "ConstantSourceNode" missing
FAIL ConstantSourceNode interface object length assert_own_property: self does not have own property "ConstantSourceNode" expected property "ConstantSourceNode" missing
FAIL ConstantSourceNode interface object name assert_own_property: self does not have own property "ConstantSourceNode" expected property "ConstantSourceNode" missing
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,7 +1,7 @@
PASS # AUDIT TASK RUNNER STARTED.
-FAIL Executing "interpolate" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfChannels: context.destination.channelCount})')"
+FAIL Executing "interpolate" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
+ .then')"
PASS Audit report
PASS > [interpolate] Interpolation of AudioBuffers to context sample rate
PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,9 +1,9 @@
PASS # AUDIT TASK RUNNER STARTED.
-FAIL Executing "buffer-stitching-1" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
-FAIL Executing "buffer-stitching-2" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
+FAIL Executing "buffer-stitching-1" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'testBufferStitching(sampleRate, bufferRate, bufferLength)
+ .then')"
+FAIL Executing "buffer-stitching-2" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'testBufferStitching(sampleRate, bufferRate, bufferLength)
+ .then')"
PASS Audit report
PASS > [buffer-stitching-1] Subsample buffer stitching, same rates
PASS Test 1: context.sampleRate is equal to 44100.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,20 +1,20 @@
PASS # AUDIT TASK RUNNER STARTED.
-FAIL Executing "attack" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
-FAIL Executing "knee" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
-FAIL Executing "ratio" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
-FAIL Executing "release" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
-FAIL Executing "threshold" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
+FAIL Executing "attack" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
+FAIL Executing "knee" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
+FAIL Executing "ratio" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
+FAIL Executing "release" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
+FAIL Executing "threshold" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
PASS Audit report
PASS > [attack] Dynamics compressor attack
+FAIL X attack: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
PASS > [knee] Dynamics compressor knee
+FAIL X knee: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
PASS > [ratio] Dynamics compressor ratio
+FAIL X ratio: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
PASS > [release] Dynamics compressor release
+FAIL X release: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
PASS > [threshold] Dynamics compressor threshold
-PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
+FAIL X threshold: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
+FAIL # AUDIT TASK RUNNER FINISHED: 5 out of 5 tasks were failed. assert_true: expected true got false
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,8 +1,7 @@
PASS # AUDIT TASK RUNNER STARTED.
FAIL Executing "Initialize worklet" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.audioWorklet.addModule')"
-FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfChannels: context.destination.channelCount})')"
+FAIL Executing "test" promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AudioWorkletNode"
PASS Audit report
PASS > [Initialize worklet]
PASS > [test] Simple AudioWorklet I/O
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,7 +1,7 @@
PASS # AUDIT TASK RUNNER STARTED.
FAIL Executing "initialize" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.audioWorklet.addModule')"
-FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context, {numberOfInputs: numberOfInputs})')"
+FAIL Executing "test" promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AudioWorkletNode"
PASS Audit report
PASS > [initialize]
PASS > [test]
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -5,15 +5,15 @@
PASS Audit report
PASS > [exceptions-channels]
PASS context.createChannelMerger() did not throw an exception.
-PASS context.createChannelMerger(0) threw IndexSizeError: "The index is not in the allowed range.".
+PASS context.createChannelMerger(0) threw IndexSizeError: "Number of inputs is not in the allowed range.".
PASS context.createChannelMerger(32) did not throw an exception.
-PASS context.createChannelMerger(33) threw IndexSizeError: "The index is not in the allowed range.".
+PASS context.createChannelMerger(33) threw IndexSizeError: "Number of inputs is not in the allowed range.".
PASS < [exceptions-channels] All assertions passed. (total 4 assertions)
PASS > [exceptions-properties]
-FAIL X merger.channelCount is not equal to 1. Got 2. assert_true: expected true got false
-FAIL X merger.channelCount = 3 did not throw an exception. assert_true: expected true got false
-FAIL X merger.channelCountMode is not equal to explicit. Got max. assert_true: expected true got false
-FAIL X merger.channelCountMode = "max" did not throw an exception. assert_true: expected true got false
-FAIL < [exceptions-properties] 4 out of 4 assertions were failed. assert_true: expected true got false
-FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed. assert_true: expected true got false
+PASS merger.channelCount is equal to 1.
+PASS merger.channelCount = 3 threw InvalidStateError: "Channel count cannot be changed from 1.".
+PASS merger.channelCountMode is equal to explicit.
+PASS merger.channelCountMode = "max" threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS < [exceptions-properties] All assertions passed. (total 4 assertions)
+PASS # AUDIT TASK RUNNER FINISHED: 2 tasks ran successfully.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -2,24 +2,52 @@
PASS # AUDIT TASK RUNNER STARTED.
PASS Executing "initialize"
PASS Executing "invalid constructor"
-FAIL Executing "default constructor" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
-FAIL Executing "test AudioNodeOptions" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.channelCount')"
-FAIL Executing "constructor options" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
+PASS Executing "default constructor"
+PASS Executing "test AudioNodeOptions"
+PASS Executing "constructor options"
PASS Audit report
PASS > [initialize]
PASS context = new OfflineAudioContext(...) did not throw an exception.
PASS < [initialize] All assertions passed. (total 1 assertions)
PASS > [invalid constructor]
-PASS new ChannelMergerNode() threw TypeError: "function is not a constructor (evaluating 'new window[name]()')".
-PASS new ChannelMergerNode(1) threw TypeError: "function is not a constructor (evaluating 'new window[name](1)')".
-PASS new ChannelMergerNode(context, 42) threw TypeError: "function is not a constructor (evaluating 'new window[name](context, 42)')".
+PASS new ChannelMergerNode() threw TypeError: "Not enough arguments".
+PASS new ChannelMergerNode(1) threw TypeError: "Argument 1 ('context') to the ChannelMergerNode constructor must be an instance of BaseAudioContext".
+PASS new ChannelMergerNode(context, 42) threw TypeError: "Type error".
PASS < [invalid constructor] All assertions passed. (total 3 assertions)
PASS > [default constructor]
-FAIL X node0 = new ChannelMergerNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new window[name](context, options.constructorOptions)')". assert_true: expected true got false
-FAIL X node0 instanceof ChannelMergerNode is not equal to true. Got false. assert_true: expected true got false
+PASS node0 = new ChannelMergerNode(context) did not throw an exception.
+PASS node0 instanceof ChannelMergerNode is equal to true.
+PASS node0.numberOfInputs is equal to 6.
+PASS node0.numberOfOutputs is equal to 1.
+PASS node0.channelCount is equal to 1.
+PASS node0.channelCountMode is equal to explicit.
+PASS node0.channelInterpretation is equal to speakers.
+PASS < [default constructor] All assertions passed. (total 7 assertions)
PASS > [test AudioNodeOptions]
-FAIL X new ChannelMergerNode(c, {channelCount: 1}) incorrectly threw TypeError: "function is not a constructor (evaluating 'new window[nodeName]')". assert_true: expected true got false
+PASS new ChannelMergerNode(c, {channelCount: 1}) did not throw an exception.
+PASS node.channelCount is equal to 1.
+PASS new ChannelMergerNode(c, {channelCount: 2}) threw InvalidStateError: "Channel count cannot be changed from 1.".
+PASS (new ChannelMergerNode(c, {channelCount: 1})).channelCount = 1 did not throw an exception.
+PASS new ChannelMergerNode(c, {channelCountMode: "explicit"} did not throw an exception.
+PASS node.channelCountMode is equal to explicit.
+PASS new ChannelMergerNode(c, {channelCountMode: "max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS new ChannelMergerNode(c, {channelCountMode: "clamped-max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS (new ChannelMergerNode(c, {channelCountMode: "explicit"})).channelCountMode = "explicit" did not throw an exception.
+PASS new ChannelMergerNode(c, {channelInterpretation: "speakers"}) did not throw an exception.
+PASS node.channelInterpretation is equal to speakers.
+PASS new ChannelMergerNode(c, {channelInterpretation: "discrete"}) did not throw an exception.
+PASS node.channelInterpretation is equal to discrete.
+PASS new ChannelMergerNode(c, {channelInterpretation: "foobar"}) threw TypeError: "Type error".
+PASS node.channelInterpretation after invalid setter is equal to discrete.
+PASS < [test AudioNodeOptions] All assertions passed. (total 15 assertions)
PASS > [constructor options]
-FAIL X node1 = new ChannelMergerNode(context, {"numberOfInputs":3,"numberOfOutputs":9,"channelInterpretation":"discrete"}) incorrectly threw TypeError: "function is not a constructor (evaluating 'new ChannelMergerNode(context, options)')". assert_true: expected true got false
-FAIL # AUDIT TASK RUNNER FINISHED: 3 out of 5 tasks were failed. assert_true: expected true got false
+PASS node1 = new ChannelMergerNode(context, {"numberOfInputs":3,"numberOfOutputs":9,"channelInterpretation":"discrete"}) did not throw an exception.
+PASS node1.numberOfInputs is equal to 3.
+PASS node1.numberOfOutputs is equal to 1.
+PASS node1.channelInterpretation is equal to discrete.
+PASS new ChannelMergerNode(c, {"numberOfInputs":99}) threw IndexSizeError: "Number of inputs is not in the allowed range.".
+PASS new ChannelMergerNode(c, {"channelCount":3}) threw InvalidStateError: "Channel count cannot be changed from 1.".
+PASS new ChannelMergerNode(c, {"channelCountMode":"max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS < [constructor options] All assertions passed. (total 7 assertions)
+PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -5,8 +5,8 @@
.then')"
PASS Audit report
PASS > [construction] Construction of ChannelSplitterNode
-PASS createChannelSplitter(0) threw IndexSizeError: "The index is not in the allowed range.".
-PASS createChannelSplitter(33) threw IndexSizeError: "The index is not in the allowed range.".
+PASS createChannelSplitter(0) threw IndexSizeError: "Number of outputs is not in the allowed range".
+PASS createChannelSplitter(33) threw IndexSizeError: "Number of outputs is not in the allowed range".
PASS splitternode = context.createChannelSplitter(32) did not throw an exception.
PASS splitternode.numberOfOutputs is equal to 32.
PASS splitternode.numberOfInputs is equal to 1.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -2,24 +2,48 @@
PASS # AUDIT TASK RUNNER STARTED.
PASS Executing "initialize"
PASS Executing "invalid constructor"
-FAIL Executing "default constructor" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
-FAIL Executing "test AudioNodeOptions" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.channelCount')"
-FAIL Executing "constructor options" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
+PASS Executing "default constructor"
+PASS Executing "test AudioNodeOptions"
+PASS Executing "constructor options"
PASS Audit report
PASS > [initialize]
PASS context = new OfflineAudioContext(...) did not throw an exception.
PASS < [initialize] All assertions passed. (total 1 assertions)
PASS > [invalid constructor]
-PASS new ChannelSplitterNode() threw TypeError: "function is not a constructor (evaluating 'new window[name]()')".
-PASS new ChannelSplitterNode(1) threw TypeError: "function is not a constructor (evaluating 'new window[name](1)')".
-PASS new ChannelSplitterNode(context, 42) threw TypeError: "function is not a constructor (evaluating 'new window[name](context, 42)')".
+PASS new ChannelSplitterNode() threw TypeError: "Not enough arguments".
+PASS new ChannelSplitterNode(1) threw TypeError: "Argument 1 ('context') to the ChannelSplitterNode constructor must be an instance of BaseAudioContext".
+PASS new ChannelSplitterNode(context, 42) threw TypeError: "Type error".
PASS < [invalid constructor] All assertions passed. (total 3 assertions)
PASS > [default constructor]
-FAIL X node0 = new ChannelSplitterNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new window[name](context, options.constructorOptions)')". assert_true: expected true got false
-FAIL X node0 instanceof ChannelSplitterNode is not equal to true. Got false. assert_true: expected true got false
+PASS node0 = new ChannelSplitterNode(context) did not throw an exception.
+PASS node0 instanceof ChannelSplitterNode is equal to true.
+PASS node0.numberOfInputs is equal to 1.
+PASS node0.numberOfOutputs is equal to 6.
+PASS node0.channelCount is equal to 6.
+PASS node0.channelCountMode is equal to explicit.
+PASS node0.channelInterpretation is equal to discrete.
+PASS < [default constructor] All assertions passed. (total 7 assertions)
PASS > [test AudioNodeOptions]
-FAIL X new ChannelSplitterNode(c, {channelCount: 6}) incorrectly threw TypeError: "function is not a constructor (evaluating 'new window[nodeName]')". assert_true: expected true got false
+PASS new ChannelSplitterNode(c, {channelCount: 6}) did not throw an exception.
+PASS node.channelCount is equal to 6.
+PASS new ChannelSplitterNode(c, {channelCount: 7}) threw IndexSizeError: "Channel count must be set to number of outputs.".
+PASS (new ChannelSplitterNode(c, {channelCount: 6})).channelCount = 6 did not throw an exception.
+PASS new ChannelSplitterNode(c, {channelCountMode: "explicit"} did not throw an exception.
+PASS node.channelCountMode is equal to explicit.
+PASS new ChannelSplitterNode(c, {channelCountMode: "max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS new ChannelSplitterNode(c, {channelCountMode: "clamped-max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS (new ChannelSplitterNode(c, {channelCountMode: "explicit"})).channelCountMode = "explicit" did not throw an exception.
+PASS new ChannelSplitterNode(c, {channelInterpretation: "speakers"}) threw InvalidStateError: "Channel interpretation cannot be changed from discrete.".
+PASS (new ChannelSplitterNode(c, {channelInterpretation: "discrete"})).channelInterpretation = "discrete" did not throw an exception.
+PASS < [test AudioNodeOptions] All assertions passed. (total 11 assertions)
PASS > [constructor options]
-FAIL X node1 = new ChannelSplitterNode(context, {"numberOfInputs":3,"numberOfOutputs":9,"channelInterpretation":"discrete"}) incorrectly threw TypeError: "function is not a constructor (evaluating 'new ChannelSplitterNode(context, options)')". assert_true: expected true got false
-FAIL # AUDIT TASK RUNNER FINISHED: 3 out of 5 tasks were failed. assert_true: expected true got false
+PASS node1 = new ChannelSplitterNode(context, {"numberOfInputs":3,"numberOfOutputs":9,"channelInterpretation":"discrete"}) did not throw an exception.
+PASS node1.numberOfInputs is equal to 1.
+PASS node1.numberOfOutputs is equal to 9.
+PASS node1.channelInterpretation is equal to discrete.
+PASS new ChannelSplitterNode(c, {"numberOfOutputs":99}) threw IndexSizeError: "Number of outputs is not in the allowed range".
+PASS new ChannelSplitterNode(c, {"channelCount":3}) threw IndexSizeError: "Channel count must be set to number of outputs.".
+PASS new ChannelSplitterNode(c, {"channelCountMode":"max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
+PASS < [constructor options] All assertions passed. (total 7 assertions)
+PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,7 +1,7 @@
PASS # AUDIT TASK RUNNER STARTED.
-FAIL Executing "detune limits" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfInputs: context.destination.channelCount})')"
+FAIL Executing "detune limits" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
+ .then')"
FAIL Executing "detune automation" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
.then')"
PASS Audit report
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -2,8 +2,8 @@
PASS # AUDIT TASK RUNNER STARTED.
PASS Executing "ref-distance-error"
PASS Executing "max-distance-error"
-FAIL Executing "min-distance" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context, {numberOfOutputs: 2})')"
-FAIL Executing "max-distance" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context, {numberOfOutputs: 2})')"
+FAIL Executing "min-distance" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering().then')"
+FAIL Executing "max-distance" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering().then')"
PASS Audit report
PASS > [ref-distance-error]
PASS new PannerNode(c, {refDistance: -1}) threw RangeError: "refDistance cannot be set to a negative value".
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt (265065 => 265066)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,7 +1,7 @@
PASS # AUDIT TASK RUNNER STARTED.
-FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
- context, {numberOfChannels: context.destination.channelCount})')"
+FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
+ .then')"
PASS Audit report
PASS > [test] ScriptProcessor with stopped input source
PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
Modified: trunk/Source/WebCore/CMakeLists.txt (265065 => 265066)
--- trunk/Source/WebCore/CMakeLists.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/CMakeLists.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -465,7 +465,9 @@
Modules/webaudio/ChannelCountMode.idl
Modules/webaudio/ChannelInterpretation.idl
Modules/webaudio/ChannelMergerNode.idl
+ Modules/webaudio/ChannelMergerOptions.idl
Modules/webaudio/ChannelSplitterNode.idl
+ Modules/webaudio/ChannelSplitterOptions.idl
Modules/webaudio/ConvolverNode.idl
Modules/webaudio/DelayNode.idl
Modules/webaudio/DistanceModelType.idl
Modified: trunk/Source/WebCore/ChangeLog (265065 => 265066)
--- trunk/Source/WebCore/ChangeLog 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/ChangeLog 2020-07-29 23:29:48 UTC (rev 265066)
@@ -1,5 +1,48 @@
2020-07-29 Clark Wang <clark_w...@apple.com>
+ Added constructor methods to ChannelMergerNode, ChannelSplitterNode
+ https://bugs.webkit.org/show_bug.cgi?id=214851
+ <rdar://problem/66233763>
+
+ Reviewed by Chris Dumez.
+
+ Added constructors for ChannelMergerNode, ChannelSplitterNode according to spec:
+ https://www.w3.org/TR/webaudio/#ChannelMergerNode-constructors. Added new files
+ for ChannelMergerOptions and ChannelSplitterOptions. This patch also ensures that
+ BaseAudioContext::create*() and *Node::create() methods behave the same.
+
+ Re-baselined existing tests that now pass, or fail further along.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Modules/webaudio/AudioNode.h:
+ * Modules/webaudio/BaseAudioContext.cpp:
+ (WebCore::BaseAudioContext::createChannelSplitter):
+ (WebCore::BaseAudioContext::createChannelMerger):
+ * Modules/webaudio/ChannelMergerNode.cpp:
+ (WebCore::ChannelMergerNode::create):
+ (WebCore::ChannelMergerNode::setChannelCount):
+ (WebCore::ChannelMergerNode::setChannelCountMode):
+ * Modules/webaudio/ChannelMergerNode.h:
+ * Modules/webaudio/ChannelMergerNode.idl:
+ * Modules/webaudio/ChannelMergerOptions.h: Added.
+ * Modules/webaudio/ChannelMergerOptions.idl: Added.
+ * Modules/webaudio/ChannelSplitterNode.cpp:
+ (WebCore::ChannelSplitterNode::create):
+ (WebCore::ChannelSplitterNode::setChannelCount):
+ (WebCore::ChannelSplitterNode::setChannelCountMode):
+ (WebCore::ChannelSplitterNode::setChannelInterpretation):
+ * Modules/webaudio/ChannelSplitterNode.h:
+ * Modules/webaudio/ChannelSplitterNode.idl:
+ * Modules/webaudio/ChannelSplitterOptions.h: Added.
+ * Modules/webaudio/ChannelSplitterOptions.idl: Added.
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+
+2020-07-29 Clark Wang <clark_w...@apple.com>
+
Added copyFromChannel, copyToChannel to AudioBuffer
https://bugs.webkit.org/show_bug.cgi?id=214926
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (265065 => 265066)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-07-29 23:29:48 UTC (rev 265066)
@@ -314,7 +314,9 @@
$(PROJECT_DIR)/Modules/webaudio/ChannelCountMode.idl
$(PROJECT_DIR)/Modules/webaudio/ChannelInterpretation.idl
$(PROJECT_DIR)/Modules/webaudio/ChannelMergerNode.idl
+$(PROJECT_DIR)/Modules/webaudio/ChannelMergerOptions.idl
$(PROJECT_DIR)/Modules/webaudio/ChannelSplitterNode.idl
+$(PROJECT_DIR)/Modules/webaudio/ChannelSplitterOptions.idl
$(PROJECT_DIR)/Modules/webaudio/ConvolverNode.idl
$(PROJECT_DIR)/Modules/webaudio/DelayNode.idl
$(PROJECT_DIR)/Modules/webaudio/DistanceModelType.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (265065 => 265066)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2020-07-29 23:29:48 UTC (rev 265066)
@@ -313,8 +313,12 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelInterpretation.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerNode.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerNode.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerOptions.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerOptions.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterNode.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterNode.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterOptions.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterOptions.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCharacterData.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCharacterData.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChildNode.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (265065 => 265066)
--- trunk/Source/WebCore/DerivedSources.make 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/DerivedSources.make 2020-07-29 23:29:48 UTC (rev 265066)
@@ -397,7 +397,9 @@
$(WebCore)/Modules/webaudio/ChannelCountMode.idl \
$(WebCore)/Modules/webaudio/ChannelInterpretation.idl \
$(WebCore)/Modules/webaudio/ChannelMergerNode.idl \
+ $(WebCore)/Modules/webaudio/ChannelMergerOptions.idl \
$(WebCore)/Modules/webaudio/ChannelSplitterNode.idl \
+ $(WebCore)/Modules/webaudio/ChannelSplitterOptions.idl \
$(WebCore)/Modules/webaudio/ConvolverNode.idl \
$(WebCore)/Modules/webaudio/DelayNode.idl \
$(WebCore)/Modules/webaudio/DistanceModelType.idl \
Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.h (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/AudioNode.h 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNode.h 2020-07-29 23:29:48 UTC (rev 265066)
@@ -180,7 +180,7 @@
virtual ExceptionOr<void> setChannelCountMode(ChannelCountMode);
ChannelInterpretation channelInterpretation() const { return m_channelInterpretation; }
- ExceptionOr<void> setChannelInterpretation(ChannelInterpretation);
+ virtual ExceptionOr<void> setChannelInterpretation(ChannelInterpretation);
protected:
// Inputs and outputs must be created before the AudioNode is initialized.
Modified: trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp 2020-07-29 23:29:48 UTC (rev 265066)
@@ -40,7 +40,9 @@
#include "AudioSession.h"
#include "BiquadFilterNode.h"
#include "ChannelMergerNode.h"
+#include "ChannelMergerOptions.h"
#include "ChannelSplitterNode.h"
+#include "ChannelSplitterOptions.h"
#include "ConvolverNode.h"
#include "DefaultAudioDestinationNode.h"
#include "DelayNode.h"
@@ -586,14 +588,10 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
- lazyInitialize();
- auto node = ChannelSplitterNode::create(*this, sampleRate(), numberOfOutputs);
- if (!node)
- return Exception { IndexSizeError };
- return node.releaseNonNull();
+ ChannelSplitterOptions options;
+ options.numberOfOutputs = numberOfOutputs;
+ return ChannelSplitterNode::create(*this, options);
}
ExceptionOr<Ref<ChannelMergerNode>> BaseAudioContext::createChannelMerger(size_t numberOfInputs)
@@ -601,14 +599,10 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
- lazyInitialize();
- auto node = ChannelMergerNode::create(*this, sampleRate(), numberOfInputs);
- if (!node)
- return Exception { IndexSizeError };
- return node.releaseNonNull();
+ ChannelMergerOptions options;
+ options.numberOfInputs = numberOfInputs;
+ return ChannelMergerNode::create(*this, options);
}
ExceptionOr<Ref<OscillatorNode>> BaseAudioContext::createOscillator()
Modified: trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.cpp (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.cpp 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.cpp 2020-07-29 23:29:48 UTC (rev 265066)
@@ -43,12 +43,31 @@
WTF_MAKE_ISO_ALLOCATED_IMPL(ChannelMergerNode);
-RefPtr<ChannelMergerNode> ChannelMergerNode::create(BaseAudioContext& context, float sampleRate, unsigned numberOfInputs)
+ExceptionOr<Ref<ChannelMergerNode>> ChannelMergerNode::create(BaseAudioContext& context, const ChannelMergerOptions& options)
{
- if (!numberOfInputs || numberOfInputs > AudioContext::maxNumberOfChannels())
- return nullptr;
+ if (context.isStopped())
+ return Exception { InvalidStateError };
+
+ context.lazyInitialize();
- return adoptRef(*new ChannelMergerNode(context, sampleRate, numberOfInputs));
+ if (options.numberOfInputs > AudioContext::maxNumberOfChannels() || !options.numberOfInputs)
+ return Exception { IndexSizeError, "Number of inputs is not in the allowed range."_s };
+
+ auto merger = adoptRef(*new ChannelMergerNode(context, context.sampleRate(), options.numberOfInputs));
+
+ auto result = merger->setChannelCount(options.channelCount.valueOr(1));
+ if (result.hasException())
+ return result.releaseException();
+
+ result = merger->setChannelCountMode(options.channelCountMode.valueOr(ChannelCountMode::Explicit));
+ if (result.hasException())
+ return result.releaseException();
+
+ result = merger->setChannelInterpretation(options.channelInterpretation.valueOr(ChannelInterpretation::Speakers));
+ if (result.hasException())
+ return result.releaseException();
+
+ return merger;
}
ChannelMergerNode::ChannelMergerNode(BaseAudioContext& context, float sampleRate, unsigned numberOfInputs)
@@ -129,6 +148,22 @@
AudioNode::checkNumberOfChannelsForInput(input);
}
+ExceptionOr<void> ChannelMergerNode::setChannelCount(unsigned channelCount)
+{
+ if (channelCount != 1)
+ return Exception { InvalidStateError, "Channel count cannot be changed from 1."_s };
+
+ return AudioNode::setChannelCount(channelCount);
+}
+
+ExceptionOr<void> ChannelMergerNode::setChannelCountMode(ChannelCountMode mode)
+{
+ if (mode != ChannelCountMode::Explicit)
+ return Exception { InvalidStateError, "Channel count mode cannot be changed from explicit."_s };
+
+ return AudioNode::setChannelCountMode(mode);
+}
+
} // namespace WebCore
#endif // ENABLE(WEB_AUDIO)
Modified: trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.h (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.h 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.h 2020-07-29 23:29:48 UTC (rev 265066)
@@ -29,6 +29,7 @@
#pragma once
#include "AudioNode.h"
+#include "ChannelMergerOptions.h"
namespace WebCore {
@@ -37,8 +38,8 @@
class ChannelMergerNode final : public AudioNode {
WTF_MAKE_ISO_ALLOCATED(ChannelMergerNode);
public:
- static RefPtr<ChannelMergerNode> create(BaseAudioContext&, float sampleRate, unsigned numberOfInputs);
-
+ static ExceptionOr<Ref<ChannelMergerNode>> create(BaseAudioContext&, const ChannelMergerOptions& = { });
+
// AudioNode
void process(size_t framesToProcess) override;
void reset() override;
@@ -45,7 +46,10 @@
// Called in the audio thread (pre-rendering task) when the number of channels for an input may have changed.
void checkNumberOfChannelsForInput(AudioNodeInput*) override;
-
+
+ ExceptionOr<void> setChannelCount(unsigned) final;
+ ExceptionOr<void> setChannelCountMode(ChannelCountMode) final;
+
private:
unsigned m_desiredNumberOfOutputChannels;
Modified: trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl 2020-07-29 23:29:48 UTC (rev 265066)
@@ -30,4 +30,5 @@
Conditional=WEB_AUDIO,
JSGenerateToJSObject
] interface ChannelMergerNode : AudioNode {
+ [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelMergerOptions options);
};
Added: trunk/Source/WebCore/Modules/webaudio/ChannelMergerOptions.h (0 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelMergerOptions.h (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelMergerOptions.h 2020-07-29 23:29:48 UTC (rev 265066)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioNodeOptions.h"
+
+namespace WebCore {
+
+struct ChannelMergerOptions : AudioNodeOptions {
+ unsigned numberOfInputs { 6 };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
Added: trunk/Source/WebCore/Modules/webaudio/ChannelMergerOptions.idl (0 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelMergerOptions.idl (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelMergerOptions.idl 2020-07-29 23:29:48 UTC (rev 265066)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ Conditional=WEB_AUDIO,
+] dictionary ChannelMergerOptions : AudioNodeOptions {
+ unsigned long numberOfInputs = 6;
+};
Modified: trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.cpp (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.cpp 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.cpp 2020-07-29 23:29:48 UTC (rev 265066)
@@ -36,13 +36,32 @@
namespace WebCore {
WTF_MAKE_ISO_ALLOCATED_IMPL(ChannelSplitterNode);
-
-RefPtr<ChannelSplitterNode> ChannelSplitterNode::create(BaseAudioContext& context, float sampleRate, unsigned numberOfOutputs)
+
+ExceptionOr<Ref<ChannelSplitterNode>> ChannelSplitterNode::create(BaseAudioContext& context, const ChannelSplitterOptions& options)
{
- if (!numberOfOutputs || numberOfOutputs > AudioContext::maxNumberOfChannels())
- return nullptr;
+ if (context.isStopped())
+ return Exception { InvalidStateError };
- return adoptRef(*new ChannelSplitterNode(context, sampleRate, numberOfOutputs));
+ context.lazyInitialize();
+
+ if (options.numberOfOutputs > AudioContext::maxNumberOfChannels() || !options.numberOfOutputs)
+ return Exception { IndexSizeError, "Number of outputs is not in the allowed range"_s };
+
+ auto splitter = adoptRef(*new ChannelSplitterNode(context, context.sampleRate(), options.numberOfOutputs));
+
+ auto result = splitter->setChannelCount(options.channelCount.valueOr(options.numberOfOutputs));
+ if (result.hasException())
+ return result.releaseException();
+
+ result = splitter->setChannelCountMode(options.channelCountMode.valueOr(ChannelCountMode::Explicit));
+ if (result.hasException())
+ return result.releaseException();
+
+ result = splitter->setChannelInterpretation(options.channelInterpretation.valueOr(ChannelInterpretation::Discrete));
+ if (result.hasException())
+ return result.releaseException();
+
+ return splitter;
}
ChannelSplitterNode::ChannelSplitterNode(BaseAudioContext& context, float sampleRate, unsigned numberOfOutputs)
@@ -86,6 +105,30 @@
{
}
+ExceptionOr<void> ChannelSplitterNode::setChannelCount(unsigned channelCount)
+{
+ if (channelCount != numberOfOutputs())
+ return Exception { IndexSizeError, "Channel count must be set to number of outputs."_s };
+
+ return AudioNode::setChannelCount(channelCount);
+}
+
+ExceptionOr<void> ChannelSplitterNode::setChannelCountMode(ChannelCountMode mode)
+{
+ if (mode != ChannelCountMode::Explicit)
+ return Exception { InvalidStateError, "Channel count mode cannot be changed from explicit."_s };
+
+ return AudioNode::setChannelCountMode(mode);
+}
+
+ExceptionOr<void> ChannelSplitterNode::setChannelInterpretation(ChannelInterpretation interpretation)
+{
+ if (interpretation != ChannelInterpretation::Discrete)
+ return Exception { InvalidStateError, "Channel interpretation cannot be changed from discrete."_s };
+
+ return AudioNode::setChannelInterpretation(interpretation);
+}
+
} // namespace WebCore
#endif // ENABLE(WEB_AUDIO)
Modified: trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.h (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.h 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.h 2020-07-29 23:29:48 UTC (rev 265066)
@@ -25,6 +25,7 @@
#pragma once
#include "AudioNode.h"
+#include "ChannelSplitterOptions.h"
namespace WebCore {
@@ -33,11 +34,15 @@
class ChannelSplitterNode final : public AudioNode {
WTF_MAKE_ISO_ALLOCATED(ChannelSplitterNode);
public:
- static RefPtr<ChannelSplitterNode> create(BaseAudioContext&, float sampleRate, unsigned numberOfOutputs);
+ static ExceptionOr<Ref<ChannelSplitterNode>> create(BaseAudioContext&, const ChannelSplitterOptions& = { });
// AudioNode
void process(size_t framesToProcess) override;
void reset() override;
+
+ ExceptionOr<void> setChannelCount(unsigned) final;
+ ExceptionOr<void> setChannelCountMode(ChannelCountMode) final;
+ ExceptionOr<void> setChannelInterpretation(ChannelInterpretation) final;
private:
double tailTime() const override { return 0; }
Modified: trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl (265065 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl 2020-07-29 23:29:48 UTC (rev 265066)
@@ -26,4 +26,5 @@
Conditional=WEB_AUDIO,
JSGenerateToJSObject
] interface ChannelSplitterNode : AudioNode {
+ [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelSplitterOptions options);
};
Added: trunk/Source/WebCore/Modules/webaudio/ChannelSplitterOptions.h (0 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelSplitterOptions.h (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelSplitterOptions.h 2020-07-29 23:29:48 UTC (rev 265066)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioNodeOptions.h"
+
+namespace WebCore {
+
+struct ChannelSplitterOptions : AudioNodeOptions {
+ unsigned numberOfOutputs = 6;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
Added: trunk/Source/WebCore/Modules/webaudio/ChannelSplitterOptions.idl (0 => 265066)
--- trunk/Source/WebCore/Modules/webaudio/ChannelSplitterOptions.idl (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelSplitterOptions.idl 2020-07-29 23:29:48 UTC (rev 265066)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ Conditional=WEB_AUDIO,
+] dictionary ChannelSplitterOptions : AudioNodeOptions {
+ unsigned long numberOfOutputs = 6;
+};
Modified: trunk/Source/WebCore/Sources.txt (265065 => 265066)
--- trunk/Source/WebCore/Sources.txt 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/Sources.txt 2020-07-29 23:29:48 UTC (rev 265066)
@@ -2709,7 +2709,9 @@
JSChannelCountMode.cpp
JSChannelInterpretation.cpp
JSChannelMergerNode.cpp
+JSChannelMergerOptions.cpp
JSChannelSplitterNode.cpp
+JSChannelSplitterOptions.cpp
JSCharacterData.cpp
JSChildNode.cpp
JSClipboard.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (265065 => 265066)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-07-29 23:15:09 UTC (rev 265065)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-07-29 23:29:48 UTC (rev 265066)
@@ -15856,6 +15856,10 @@
E7CF848924C0E05700B06B90 /* AudioScheduledSourceNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AudioScheduledSourceNode.idl; sourceTree = "<group>"; };
E7CF84A524C635F400B06B90 /* OfflineAudioContextOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OfflineAudioContextOptions.h; sourceTree = "<group>"; };
E7CF84A724C635F400B06B90 /* OfflineAudioContextOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = OfflineAudioContextOptions.idl; sourceTree = "<group>"; };
+ E7E0352024CF60ED008DFEFB /* ChannelMergerOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChannelMergerOptions.h; sourceTree = "<group>"; };
+ E7E0352224CF60ED008DFEFB /* ChannelMergerOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChannelMergerOptions.idl; sourceTree = "<group>"; };
+ E7E0352424CF715E008DFEFB /* ChannelSplitterOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChannelSplitterOptions.h; sourceTree = "<group>"; };
+ E7E0352524CF715E008DFEFB /* ChannelSplitterOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChannelSplitterOptions.idl; sourceTree = "<group>"; };
EB081CD81696084400553730 /* TypeConversions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeConversions.h; sourceTree = "<group>"; };
EB081CD91696084400553730 /* TypeConversions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TypeConversions.idl; sourceTree = "<group>"; };
EBE5B224245A26EE003A5A88 /* SQLiteStatementAutoResetScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteStatementAutoResetScope.h; sourceTree = "<group>"; };
@@ -29481,9 +29485,13 @@
FD315FB412B0267500C1A359 /* ChannelMergerNode.cpp */,
FD315FB512B0267500C1A359 /* ChannelMergerNode.h */,
FD315FB612B0267500C1A359 /* ChannelMergerNode.idl */,
+ E7E0352024CF60ED008DFEFB /* ChannelMergerOptions.h */,
+ E7E0352224CF60ED008DFEFB /* ChannelMergerOptions.idl */,
FD315FB712B0267500C1A359 /* ChannelSplitterNode.cpp */,
FD315FB812B0267500C1A359 /* ChannelSplitterNode.h */,
FD315FB912B0267500C1A359 /* ChannelSplitterNode.idl */,
+ E7E0352424CF715E008DFEFB /* ChannelSplitterOptions.h */,
+ E7E0352524CF715E008DFEFB /* ChannelSplitterOptions.idl */,
FD315FDE12B0267600C1A359 /* ConvolverNode.cpp */,
FD315FDF12B0267600C1A359 /* ConvolverNode.h */,
FD315FE012B0267600C1A359 /* ConvolverNode.idl */,