Changeset 265002 in webkit


Ignore:
Timestamp:
Jul 28, 2020 1:14:31 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Added constructor methods to ChannelMergerNode, ChannelSplitterNode
https://bugs.webkit.org/show_bug.cgi?id=214851

Patch by Clark Wang <clark_wang@apple.com> on 2020-07-28
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Re-baselined existing tests that now pass, or fail further along.

  • 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:

Source/WebCore:

Added constructors for ChannelMergerNode, ChannelSplitterNode according to spec:
https://www.w3.org/TR/webaudio/#ChannelMergerNode-constructors. Added new files
for ChannelMergerOptions and ChannelSplitterOptions.

Re-baselined existing tests that now pass, or fail due to a different interface.

  • 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:
Location:
trunk
Files:
4 added
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r265001 r265002  
     12020-07-28  Clark Wang  <clark_wang@apple.com>
     2
     3        Added constructor methods to ChannelMergerNode, ChannelSplitterNode
     4        https://bugs.webkit.org/show_bug.cgi?id=214851
     5
     6        Reviewed by Chris Dumez.
     7
     8        Re-baselined existing tests that now pass, or fail further along.
     9
     10        * web-platform-tests/webaudio/idlharness.https.window-expected.txt:
     11        * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling-expected.txt:
     12        * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt:
     13        * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt:
     14        * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt:
     15        * web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt:
     16        * web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic-expected.txt:
     17        * web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger-expected.txt:
     18        * web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter-expected.txt:
     19        * web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt:
     20        * web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt:
     21        * web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt:
     22        * web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt:
     23
    1242020-07-28  Rob Buis  <rbuis@igalia.com>
    225
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt

    r264941 r265002  
    502502FAIL 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)')"
    503503PASS ChannelMergerNode interface: existence and properties of interface object
    504 FAIL ChannelMergerNode interface object length assert_equals: wrong value for ChannelMergerNode.length expected 1 but got 0
     504PASS ChannelMergerNode interface object length
    505505PASS ChannelMergerNode interface object name
    506506PASS ChannelMergerNode interface: existence and properties of interface prototype object
    507507PASS ChannelMergerNode interface: existence and properties of interface prototype object's "constructor" property
    508508PASS ChannelMergerNode interface: existence and properties of interface prototype object's @@unscopables property
    509 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)')"
    510 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)')"
    511 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)')"
    512 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)')"
    513 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)')"
    514 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)')"
    515 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)')"
    516 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)')"
    517 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)')"
    518 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)')"
    519 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)')"
    520 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)')"
    521 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)')"
    522 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)')"
    523 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)')"
    524 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)')"
    525 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)')"
    526 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)')"
    527 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)')"
    528 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)')"
    529 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)')"
    530 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)')"
    531 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)')"
    532 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)')"
    533 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)')"
     509PASS ChannelMergerNode must be primary interface of new ChannelMergerNode(context)
     510PASS Stringification of new ChannelMergerNode(context)
     511PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type
     512PASS AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     513PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type
     514PASS AudioNode interface: calling connect(AudioParam, optional unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     515PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect()" with the proper type
     516PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(unsigned long)" with the proper type
     517PASS AudioNode interface: calling disconnect(unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     518PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode)" with the proper type
     519PASS AudioNode interface: calling disconnect(AudioNode) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     520PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type
     521PASS AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     522PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type
     523PASS AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     524PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam)" with the proper type
     525PASS AudioNode interface: calling disconnect(AudioParam) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     526PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type
     527PASS AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError
     528PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "context" with the proper type
     529PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfInputs" with the proper type
     530PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfOutputs" with the proper type
     531PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCount" with the proper type
     532PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCountMode" with the proper type
     533PASS AudioNode interface: new ChannelMergerNode(context) must inherit property "channelInterpretation" with the proper type
    534534PASS ChannelSplitterNode interface: existence and properties of interface object
    535 FAIL ChannelSplitterNode interface object length assert_equals: wrong value for ChannelSplitterNode.length expected 1 but got 0
     535PASS ChannelSplitterNode interface object length
    536536PASS ChannelSplitterNode interface object name
    537537PASS ChannelSplitterNode interface: existence and properties of interface prototype object
    538538PASS ChannelSplitterNode interface: existence and properties of interface prototype object's "constructor" property
    539539PASS ChannelSplitterNode interface: existence and properties of interface prototype object's @@unscopables property
    540 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)')"
    541 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)')"
    542 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)')"
    543 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)')"
    544 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)')"
    545 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)')"
    546 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)')"
    547 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)')"
    548 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)')"
    549 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)')"
    550 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)')"
    551 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)')"
    552 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)')"
    553 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)')"
    554 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)')"
    555 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)')"
    556 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)')"
    557 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)')"
    558 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)')"
    559 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)')"
    560 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)')"
    561 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)')"
    562 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)')"
    563 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)')"
    564 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)')"
     540PASS ChannelSplitterNode must be primary interface of new ChannelSplitterNode(context)
     541PASS Stringification of new ChannelSplitterNode(context)
     542PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type
     543PASS AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     544PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type
     545PASS AudioNode interface: calling connect(AudioParam, optional unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     546PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect()" with the proper type
     547PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(unsigned long)" with the proper type
     548PASS AudioNode interface: calling disconnect(unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     549PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode)" with the proper type
     550PASS AudioNode interface: calling disconnect(AudioNode) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     551PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type
     552PASS AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     553PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type
     554PASS AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     555PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioParam)" with the proper type
     556PASS AudioNode interface: calling disconnect(AudioParam) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     557PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type
     558PASS AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelSplitterNode(context) with too few arguments must throw TypeError
     559PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "context" with the proper type
     560PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "numberOfInputs" with the proper type
     561PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "numberOfOutputs" with the proper type
     562PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelCount" with the proper type
     563PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelCountMode" with the proper type
     564PASS AudioNode interface: new ChannelSplitterNode(context) must inherit property "channelInterpretation" with the proper type
    565565FAIL ConstantSourceNode interface: existence and properties of interface object assert_own_property: self does not have own property "ConstantSourceNode" expected property "ConstantSourceNode" missing
    566566FAIL ConstantSourceNode interface object length assert_own_property: self does not have own property "ConstantSourceNode" expected property "ConstantSourceNode" missing
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling-expected.txt

    r264657 r265002  
    11
    22PASS # AUDIT TASK RUNNER STARTED.
    3 FAIL Executing "interpolate" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    4                 context, {numberOfChannels: context.destination.channelCount})')"
     3FAIL Executing "interpolate" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
     4                .then')"
    55PASS Audit report
    66PASS > [interpolate] Interpolation of AudioBuffers to context sample rate
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt

    r264657 r265002  
    11
    22PASS # AUDIT TASK RUNNER STARTED.
    3 FAIL Executing "buffer-stitching-1" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    4             context, {numberOfInputs: context.destination.channelCount})')"
    5 FAIL Executing "buffer-stitching-2" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    6             context, {numberOfInputs: context.destination.channelCount})')"
     3FAIL Executing "buffer-stitching-1" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'testBufferStitching(sampleRate, bufferRate, bufferLength)
     4                .then')"
     5FAIL Executing "buffer-stitching-2" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'testBufferStitching(sampleRate, bufferRate, bufferLength)
     6                .then')"
    77PASS Audit report
    88PASS > [buffer-stitching-1] Subsample buffer stitching, same rates
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt

    r264657 r265002  
    11
    22PASS # AUDIT TASK RUNNER STARTED.
    3 FAIL Executing "attack" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    4             context, {numberOfInputs: context.destination.channelCount})')"
    5 FAIL Executing "knee" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    6             context, {numberOfInputs: context.destination.channelCount})')"
    7 FAIL Executing "ratio" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    8             context, {numberOfInputs: context.destination.channelCount})')"
    9 FAIL Executing "release" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    10             context, {numberOfInputs: context.destination.channelCount})')"
    11 FAIL Executing "threshold" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    12             context, {numberOfInputs: context.destination.channelCount})')"
     3FAIL Executing "attack" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
     4FAIL Executing "knee" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
     5FAIL Executing "ratio" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
     6FAIL Executing "release" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
     7FAIL Executing "threshold" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'refNode[paramName]')"
    138PASS Audit report
    149PASS > [attack] Dynamics compressor attack
     10FAIL X attack: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
    1511PASS > [knee] Dynamics compressor knee
     12FAIL X knee: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
    1613PASS > [ratio] Dynamics compressor ratio
     14FAIL X ratio: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
    1715PASS > [release] Dynamics compressor release
     16FAIL X release: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
    1817PASS > [threshold] Dynamics compressor threshold
    19 PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
     18FAIL X threshold: refNode = new DynamicsCompressorNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DynamicsCompressorNode(context)')". assert_true: expected true got false
     19FAIL # AUDIT TASK RUNNER FINISHED: 5 out of 5 tasks were failed. assert_true: expected true got false
    2020
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt

    r264657 r265002  
    22PASS # AUDIT TASK RUNNER STARTED.
    33FAIL Executing "Initialize worklet" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.audioWorklet.addModule')"
    4 FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    5                 context, {numberOfChannels: context.destination.channelCount})')"
     4FAIL Executing "test" promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AudioWorkletNode"
    65PASS Audit report
    76PASS > [Initialize worklet] 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt

    r264941 r265002  
    22PASS # AUDIT TASK RUNNER STARTED.
    33FAIL Executing "initialize" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.audioWorklet.addModule')"
    4 FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(context, {numberOfInputs: numberOfInputs})')"
     4FAIL Executing "test" promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AudioWorkletNode"
    55PASS Audit report
    66PASS > [initialize] 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic-expected.txt

    r262405 r265002  
    66PASS > [exceptions-channels] 
    77PASS   context.createChannelMerger() did not throw an exception.
    8 PASS   context.createChannelMerger(0) threw IndexSizeError: "The index is not in the allowed range.".
     8PASS   context.createChannelMerger(0) threw IndexSizeError: "Number of inputs is not in the allowed range.".
    99PASS   context.createChannelMerger(32) did not throw an exception.
    10 PASS   context.createChannelMerger(33) threw IndexSizeError: "The index is not in the allowed range.".
     10PASS   context.createChannelMerger(33) threw IndexSizeError: "Number of inputs is not in the allowed range.".
    1111PASS < [exceptions-channels] All assertions passed. (total 4 assertions)
    1212PASS > [exceptions-properties] 
    13 FAIL X merger.channelCount is not equal to 1. Got 2. assert_true: expected true got false
    14 FAIL X merger.channelCount = 3 did not throw an exception. assert_true: expected true got false
    15 FAIL X merger.channelCountMode is not equal to explicit. Got max. assert_true: expected true got false
    16 FAIL X merger.channelCountMode = "max" did not throw an exception. assert_true: expected true got false
    17 FAIL < [exceptions-properties] 4 out of 4 assertions were failed. assert_true: expected true got false
    18 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed. assert_true: expected true got false
     13PASS   merger.channelCount is equal to 1.
     14PASS   merger.channelCount = 3 threw InvalidStateError: "Channel count cannot be changed from 1.".
     15PASS   merger.channelCountMode is equal to explicit.
     16PASS   merger.channelCountMode = "max" threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     17PASS < [exceptions-properties] All assertions passed. (total 4 assertions)
     18PASS # AUDIT TASK RUNNER FINISHED: 2 tasks ran successfully.
    1919
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger-expected.txt

    r262405 r265002  
    33PASS Executing "initialize"
    44PASS Executing "invalid constructor"
    5 FAIL Executing "default constructor" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
    6 FAIL Executing "test AudioNodeOptions" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.channelCount')"
    7 FAIL Executing "constructor options" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
     5PASS Executing "default constructor"
     6PASS Executing "test AudioNodeOptions"
     7PASS Executing "constructor options"
    88PASS Audit report
    99PASS > [initialize] 
     
    1111PASS < [initialize] All assertions passed. (total 1 assertions)
    1212PASS > [invalid constructor] 
    13 PASS   new ChannelMergerNode() threw TypeError: "function is not a constructor (evaluating 'new window[name]()')".
    14 PASS   new ChannelMergerNode(1) threw TypeError: "function is not a constructor (evaluating 'new window[name](1)')".
    15 PASS   new ChannelMergerNode(context, 42) threw TypeError: "function is not a constructor (evaluating 'new window[name](context, 42)')".
     13PASS   new ChannelMergerNode() threw TypeError: "Not enough arguments".
     14PASS   new ChannelMergerNode(1) threw TypeError: "Argument 1 ('context') to the ChannelMergerNode constructor must be an instance of BaseAudioContext".
     15PASS   new ChannelMergerNode(context, 42) threw TypeError: "Type error".
    1616PASS < [invalid constructor] All assertions passed. (total 3 assertions)
    1717PASS > [default constructor] 
    18 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
    19 FAIL X node0 instanceof ChannelMergerNode is not equal to true. Got false. assert_true: expected true got false
     18PASS   node0 = new ChannelMergerNode(context) did not throw an exception.
     19PASS   node0 instanceof ChannelMergerNode is equal to true.
     20PASS   node0.numberOfInputs is equal to 6.
     21PASS   node0.numberOfOutputs is equal to 1.
     22PASS   node0.channelCount is equal to 1.
     23PASS   node0.channelCountMode is equal to explicit.
     24PASS   node0.channelInterpretation is equal to speakers.
     25PASS < [default constructor] All assertions passed. (total 7 assertions)
    2026PASS > [test AudioNodeOptions] 
    21 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
     27PASS   new ChannelMergerNode(c, {channelCount: 1}) did not throw an exception.
     28PASS   node.channelCount is equal to 1.
     29PASS   new ChannelMergerNode(c, {channelCount: 2}) threw InvalidStateError: "Channel count cannot be changed from 1.".
     30PASS   (new ChannelMergerNode(c, {channelCount: 1})).channelCount = 1 did not throw an exception.
     31PASS   new ChannelMergerNode(c, {channelCountMode: "explicit"} did not throw an exception.
     32PASS   node.channelCountMode is equal to explicit.
     33PASS   new ChannelMergerNode(c, {channelCountMode: "max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     34PASS   new ChannelMergerNode(c, {channelCountMode: "clamped-max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     35PASS   (new ChannelMergerNode(c, {channelCountMode: "explicit"})).channelCountMode = "explicit" did not throw an exception.
     36PASS   new ChannelMergerNode(c, {channelInterpretation: "speakers"}) did not throw an exception.
     37PASS   node.channelInterpretation is equal to speakers.
     38PASS   new ChannelMergerNode(c, {channelInterpretation: "discrete"}) did not throw an exception.
     39PASS   node.channelInterpretation is equal to discrete.
     40PASS   new ChannelMergerNode(c, {channelInterpretation: "foobar"}) threw TypeError: "Type error".
     41PASS   node.channelInterpretation after invalid setter is equal to discrete.
     42PASS < [test AudioNodeOptions] All assertions passed. (total 15 assertions)
    2243PASS > [constructor options] 
    23 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
    24 FAIL # AUDIT TASK RUNNER FINISHED: 3 out of 5 tasks were failed. assert_true: expected true got false
     44PASS   node1 = new ChannelMergerNode(context, {"numberOfInputs":3,"numberOfOutputs":9,"channelInterpretation":"discrete"}) did not throw an exception.
     45PASS   node1.numberOfInputs is equal to 3.
     46PASS   node1.numberOfOutputs is equal to 1.
     47PASS   node1.channelInterpretation is equal to discrete.
     48PASS   new ChannelMergerNode(c, {"numberOfInputs":99}) threw IndexSizeError: "Number of inputs is not in the allowed range.".
     49PASS   new ChannelMergerNode(c, {"channelCount":3}) threw InvalidStateError: "Channel count cannot be changed from 1.".
     50PASS   new ChannelMergerNode(c, {"channelCountMode":"max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     51PASS < [constructor options] All assertions passed. (total 7 assertions)
     52PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
    2553
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter-expected.txt

    r262405 r265002  
    66PASS Audit report
    77PASS > [construction] Construction of ChannelSplitterNode
    8 PASS   createChannelSplitter(0) threw IndexSizeError: "The index is not in the allowed range.".
    9 PASS   createChannelSplitter(33) threw IndexSizeError: "The index is not in the allowed range.".
     8PASS   createChannelSplitter(0) threw IndexSizeError: "Number of outputs is not in the allowed range".
     9PASS   createChannelSplitter(33) threw IndexSizeError: "Number of outputs is not in the allowed range".
    1010PASS   splitternode = context.createChannelSplitter(32) did not throw an exception.
    1111PASS   splitternode.numberOfOutputs is equal to 32.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt

    r262405 r265002  
    33PASS Executing "initialize"
    44PASS Executing "invalid constructor"
    5 FAIL Executing "default constructor" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
    6 FAIL Executing "test AudioNodeOptions" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.channelCount')"
    7 FAIL Executing "constructor options" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
     5PASS Executing "default constructor"
     6PASS Executing "test AudioNodeOptions"
     7PASS Executing "constructor options"
    88PASS Audit report
    99PASS > [initialize] 
     
    1111PASS < [initialize] All assertions passed. (total 1 assertions)
    1212PASS > [invalid constructor] 
    13 PASS   new ChannelSplitterNode() threw TypeError: "function is not a constructor (evaluating 'new window[name]()')".
    14 PASS   new ChannelSplitterNode(1) threw TypeError: "function is not a constructor (evaluating 'new window[name](1)')".
    15 PASS   new ChannelSplitterNode(context, 42) threw TypeError: "function is not a constructor (evaluating 'new window[name](context, 42)')".
     13PASS   new ChannelSplitterNode() threw TypeError: "Not enough arguments".
     14PASS   new ChannelSplitterNode(1) threw TypeError: "Argument 1 ('context') to the ChannelSplitterNode constructor must be an instance of BaseAudioContext".
     15PASS   new ChannelSplitterNode(context, 42) threw TypeError: "Type error".
    1616PASS < [invalid constructor] All assertions passed. (total 3 assertions)
    1717PASS > [default constructor] 
    18 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
    19 FAIL X node0 instanceof ChannelSplitterNode is not equal to true. Got false. assert_true: expected true got false
     18PASS   node0 = new ChannelSplitterNode(context) did not throw an exception.
     19PASS   node0 instanceof ChannelSplitterNode is equal to true.
     20PASS   node0.numberOfInputs is equal to 1.
     21PASS   node0.numberOfOutputs is equal to 6.
     22PASS   node0.channelCount is equal to 6.
     23PASS   node0.channelCountMode is equal to explicit.
     24PASS   node0.channelInterpretation is equal to discrete.
     25PASS < [default constructor] All assertions passed. (total 7 assertions)
    2026PASS > [test AudioNodeOptions] 
    21 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
     27PASS   new ChannelSplitterNode(c, {channelCount: 6}) did not throw an exception.
     28PASS   node.channelCount is equal to 6.
     29PASS   new ChannelSplitterNode(c, {channelCount: 7}) threw IndexSizeError: "Channel count must be set to number of outputs.".
     30PASS   (new ChannelSplitterNode(c, {channelCount: 6})).channelCount = 6 did not throw an exception.
     31PASS   new ChannelSplitterNode(c, {channelCountMode: "explicit"} did not throw an exception.
     32PASS   node.channelCountMode is equal to explicit.
     33PASS   new ChannelSplitterNode(c, {channelCountMode: "max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     34PASS   new ChannelSplitterNode(c, {channelCountMode: "clamped-max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     35PASS   (new ChannelSplitterNode(c, {channelCountMode: "explicit"})).channelCountMode = "explicit" did not throw an exception.
     36PASS   new ChannelSplitterNode(c, {channelInterpretation: "speakers"}) threw InvalidStateError: "Channel interpretation cannot be changed from discrete.".
     37PASS   (new ChannelSplitterNode(c, {channelInterpretation: "discrete"})).channelInterpretation = "discrete" did not throw an exception.
     38PASS < [test AudioNodeOptions] All assertions passed. (total 11 assertions)
    2239PASS > [constructor options] 
    23 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
    24 FAIL # AUDIT TASK RUNNER FINISHED: 3 out of 5 tasks were failed. assert_true: expected true got false
     40PASS   node1 = new ChannelSplitterNode(context, {"numberOfInputs":3,"numberOfOutputs":9,"channelInterpretation":"discrete"}) did not throw an exception.
     41PASS   node1.numberOfInputs is equal to 1.
     42PASS   node1.numberOfOutputs is equal to 9.
     43PASS   node1.channelInterpretation is equal to discrete.
     44PASS   new ChannelSplitterNode(c, {"numberOfOutputs":99}) threw IndexSizeError: "Number of outputs is not in the allowed range".
     45PASS   new ChannelSplitterNode(c, {"channelCount":3}) threw IndexSizeError: "Channel count must be set to number of outputs.".
     46PASS   new ChannelSplitterNode(c, {"channelCountMode":"max"}) threw InvalidStateError: "Channel count mode cannot be changed from explicit.".
     47PASS < [constructor options] All assertions passed. (total 7 assertions)
     48PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
    2549
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt

    r264941 r265002  
    11
    22PASS # AUDIT TASK RUNNER STARTED.
    3 FAIL Executing "detune limits" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    4                 context, {numberOfInputs: context.destination.channelCount})')"
     3FAIL Executing "detune limits" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
     4                .then')"
    55FAIL Executing "detune automation" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
    66                .then')"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt

    r264941 r265002  
    33PASS Executing "ref-distance-error"
    44PASS Executing "max-distance-error"
    5 FAIL Executing "min-distance" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context, {numberOfOutputs: 2})')"
    6 FAIL Executing "max-distance" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelSplitterNode(context, {numberOfOutputs: 2})')"
     5FAIL Executing "min-distance" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering().then')"
     6FAIL Executing "max-distance" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering().then')"
    77PASS Audit report
    88PASS > [ref-distance-error] 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt

    r264657 r265002  
    11
    22PASS # AUDIT TASK RUNNER STARTED.
    3 FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: function is not a constructor (evaluating 'new ChannelMergerNode(
    4                 context, {numberOfChannels: context.destination.channelCount})')"
     3FAIL Executing "test" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'context.startRendering()
     4                .then')"
    55PASS Audit report
    66PASS > [test] ScriptProcessor with stopped input source
  • trunk/Source/WebCore/CMakeLists.txt

    r264941 r265002  
    466466    Modules/webaudio/ChannelInterpretation.idl
    467467    Modules/webaudio/ChannelMergerNode.idl
     468    Modules/webaudio/ChannelMergerOptions.idl
    468469    Modules/webaudio/ChannelSplitterNode.idl
     470    Modules/webaudio/ChannelSplitterOptions.idl
    469471    Modules/webaudio/ConvolverNode.idl
    470472    Modules/webaudio/DelayNode.idl
  • trunk/Source/WebCore/ChangeLog

    r265001 r265002  
     12020-07-28  Clark Wang  <clark_wang@apple.com>
     2
     3        Added constructor methods to ChannelMergerNode, ChannelSplitterNode
     4        https://bugs.webkit.org/show_bug.cgi?id=214851
     5
     6        Reviewed by Chris Dumez.
     7
     8        Added constructors for ChannelMergerNode, ChannelSplitterNode according to spec:
     9        https://www.w3.org/TR/webaudio/#ChannelMergerNode-constructors. Added new files
     10        for ChannelMergerOptions and ChannelSplitterOptions.
     11
     12        Re-baselined existing tests that now pass, or fail due to a different interface.
     13
     14        * CMakeLists.txt:
     15        * DerivedSources-input.xcfilelist:
     16        * DerivedSources-output.xcfilelist:
     17        * DerivedSources.make:
     18        * Modules/webaudio/AudioNode.h:
     19        * Modules/webaudio/BaseAudioContext.cpp:
     20        (WebCore::BaseAudioContext::createChannelSplitter):
     21        (WebCore::BaseAudioContext::createChannelMerger):
     22        * Modules/webaudio/ChannelMergerNode.cpp:
     23        (WebCore::ChannelMergerNode::create):
     24        (WebCore::ChannelMergerNode::setChannelCount):
     25        (WebCore::ChannelMergerNode::setChannelCountMode):
     26        * Modules/webaudio/ChannelMergerNode.h:
     27        * Modules/webaudio/ChannelMergerNode.idl:
     28        * Modules/webaudio/ChannelMergerOptions.h: Added.
     29        * Modules/webaudio/ChannelMergerOptions.idl: Added.
     30        * Modules/webaudio/ChannelSplitterNode.cpp:
     31        (WebCore::ChannelSplitterNode::create):
     32        (WebCore::ChannelSplitterNode::setChannelCount):
     33        (WebCore::ChannelSplitterNode::setChannelCountMode):
     34        (WebCore::ChannelSplitterNode::setChannelInterpretation):
     35        * Modules/webaudio/ChannelSplitterNode.h:
     36        * Modules/webaudio/ChannelSplitterNode.idl:
     37        * Modules/webaudio/ChannelSplitterOptions.h: Added.
     38        * Modules/webaudio/ChannelSplitterOptions.idl: Added.
     39        * Sources.txt:
     40        * WebCore.xcodeproj/project.pbxproj:
     41
    1422020-07-28  Rob Buis  <rbuis@igalia.com>
    243
  • trunk/Source/WebCore/DerivedSources-input.xcfilelist

    r264941 r265002  
    315315$(PROJECT_DIR)/Modules/webaudio/ChannelInterpretation.idl
    316316$(PROJECT_DIR)/Modules/webaudio/ChannelMergerNode.idl
     317$(PROJECT_DIR)/Modules/webaudio/ChannelMergerOptions.idl
    317318$(PROJECT_DIR)/Modules/webaudio/ChannelSplitterNode.idl
     319$(PROJECT_DIR)/Modules/webaudio/ChannelSplitterOptions.idl
    318320$(PROJECT_DIR)/Modules/webaudio/ConvolverNode.idl
    319321$(PROJECT_DIR)/Modules/webaudio/DelayNode.idl
  • trunk/Source/WebCore/DerivedSources-output.xcfilelist

    r264941 r265002  
    314314$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerNode.cpp
    315315$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerNode.h
     316$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerOptions.cpp
     317$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelMergerOptions.h
    316318$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterNode.cpp
    317319$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterNode.h
     320$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterOptions.cpp
     321$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSChannelSplitterOptions.h
    318322$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCharacterData.cpp
    319323$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCharacterData.h
  • trunk/Source/WebCore/DerivedSources.make

    r264941 r265002  
    398398    $(WebCore)/Modules/webaudio/ChannelInterpretation.idl \
    399399    $(WebCore)/Modules/webaudio/ChannelMergerNode.idl \
     400    $(WebCore)/Modules/webaudio/ChannelMergerOptions.idl \
    400401    $(WebCore)/Modules/webaudio/ChannelSplitterNode.idl \
     402        $(WebCore)/Modules/webaudio/ChannelSplitterOptions.idl \
    401403    $(WebCore)/Modules/webaudio/ConvolverNode.idl \
    402404    $(WebCore)/Modules/webaudio/DelayNode.idl \
  • trunk/Source/WebCore/Modules/webaudio/AudioNode.h

    r264508 r265002  
    181181
    182182    ChannelInterpretation channelInterpretation() const { return m_channelInterpretation; }
    183     ExceptionOr<void> setChannelInterpretation(ChannelInterpretation);
     183    virtual ExceptionOr<void> setChannelInterpretation(ChannelInterpretation);
    184184
    185185protected:
  • trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp

    r264941 r265002  
    4141#include "BiquadFilterNode.h"
    4242#include "ChannelMergerNode.h"
     43#include "ChannelMergerOptions.h"
    4344#include "ChannelSplitterNode.h"
     45#include "ChannelSplitterOptions.h"
    4446#include "ConvolverNode.h"
    4547#include "DefaultAudioDestinationNode.h"
     
    595597
    596598    lazyInitialize();
    597     auto node = ChannelSplitterNode::create(*this, sampleRate(), numberOfOutputs);
    598     if (!node)
    599         return Exception { IndexSizeError };
    600     return node.releaseNonNull();
     599    ChannelSplitterOptions options;
     600    options.numberOfOutputs = numberOfOutputs;
     601    return ChannelSplitterNode::create(*this, options);
    601602}
    602603
     
    610611
    611612    lazyInitialize();
    612     auto node = ChannelMergerNode::create(*this, sampleRate(), numberOfInputs);
    613     if (!node)
    614         return Exception { IndexSizeError };
    615     return node.releaseNonNull();
     613    ChannelMergerOptions options;
     614    options.numberOfInputs = numberOfInputs;
     615    return ChannelMergerNode::create(*this, options);
    616616}
    617617
  • trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.cpp

    r263410 r265002  
    4444WTF_MAKE_ISO_ALLOCATED_IMPL(ChannelMergerNode);
    4545
    46 RefPtr<ChannelMergerNode> ChannelMergerNode::create(BaseAudioContext& context, float sampleRate, unsigned numberOfInputs)
     46ExceptionOr<Ref<ChannelMergerNode>> ChannelMergerNode::create(BaseAudioContext& context, const ChannelMergerOptions& options)
    4747{
    48     if (!numberOfInputs || numberOfInputs > AudioContext::maxNumberOfChannels())
    49         return nullptr;
     48    if (options.numberOfInputs > AudioContext::maxNumberOfChannels() || !options.numberOfInputs)
     49        return Exception { IndexSizeError, "Number of inputs is not in the allowed range."_s };
    5050   
    51     return adoptRef(*new ChannelMergerNode(context, sampleRate, numberOfInputs));     
     51    auto merger = adoptRef(*new ChannelMergerNode(context, context.sampleRate(), options.numberOfInputs));
     52   
     53    auto result = merger->setChannelCount(options.channelCount.valueOr(1));
     54    if (result.hasException())
     55        return result.releaseException();
     56   
     57    result = merger->setChannelCountMode(options.channelCountMode.valueOr(ChannelCountMode::Explicit));
     58    if (result.hasException())
     59        return result.releaseException();
     60   
     61    result = merger->setChannelInterpretation(options.channelInterpretation.valueOr(ChannelInterpretation::Speakers));
     62    if (result.hasException())
     63        return result.releaseException();
     64   
     65    return merger;
    5266}
    5367
     
    130144}
    131145
     146ExceptionOr<void> ChannelMergerNode::setChannelCount(unsigned channelCount)
     147{
     148    if (channelCount != 1)
     149        return Exception { InvalidStateError, "Channel count cannot be changed from 1."_s };
     150   
     151    return AudioNode::setChannelCount(channelCount);
     152}
     153
     154ExceptionOr<void> ChannelMergerNode::setChannelCountMode(ChannelCountMode mode)
     155{
     156    if (mode != ChannelCountMode::Explicit)
     157        return Exception { InvalidStateError, "Channel count mode cannot be changed from explicit."_s };
     158   
     159    return AudioNode::setChannelCountMode(mode);
     160}
     161
    132162} // namespace WebCore
    133163
  • trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.h

    r263410 r265002  
    3030
    3131#include "AudioNode.h"
     32#include "ChannelMergerOptions.h"
    3233
    3334namespace WebCore {
     
    3839    WTF_MAKE_ISO_ALLOCATED(ChannelMergerNode);
    3940public:
    40     static RefPtr<ChannelMergerNode> create(BaseAudioContext&, float sampleRate, unsigned numberOfInputs);
    41 
     41    static ExceptionOr<Ref<ChannelMergerNode>> create(BaseAudioContext&, const ChannelMergerOptions& = { });
     42   
    4243    // AudioNode
    4344    void process(size_t framesToProcess) override;
     
    4647    // Called in the audio thread (pre-rendering task) when the number of channels for an input may have changed.
    4748    void checkNumberOfChannelsForInput(AudioNodeInput*) override;
    48 
     49   
     50    ExceptionOr<void> setChannelCount(unsigned) final;
     51    ExceptionOr<void> setChannelCountMode(ChannelCountMode) final;
     52   
    4953private:
    5054    unsigned m_desiredNumberOfOutputChannels;
  • trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl

    r165676 r265002  
    3131    JSGenerateToJSObject
    3232] interface ChannelMergerNode : AudioNode {
     33    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelMergerOptions options);
    3334};
  • trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.cpp

    r263410 r265002  
    3737
    3838WTF_MAKE_ISO_ALLOCATED_IMPL(ChannelSplitterNode);
     39
     40ExceptionOr<Ref<ChannelSplitterNode>> ChannelSplitterNode::create(BaseAudioContext& context, const ChannelSplitterOptions& options)
     41{
     42    if (options.numberOfOutputs > AudioContext::maxNumberOfChannels() || !options.numberOfOutputs)
     43        return Exception { IndexSizeError, "Number of outputs is not in the allowed range"_s };
    3944   
    40 RefPtr<ChannelSplitterNode> ChannelSplitterNode::create(BaseAudioContext& context, float sampleRate, unsigned numberOfOutputs)
    41 {
    42     if (!numberOfOutputs || numberOfOutputs > AudioContext::maxNumberOfChannels())
    43         return nullptr;
    44 
    45     return adoptRef(*new ChannelSplitterNode(context, sampleRate, numberOfOutputs));     
     45    auto splitter = adoptRef(*new ChannelSplitterNode(context, context.sampleRate(), options.numberOfOutputs));
     46   
     47    auto result = splitter->setChannelCount(options.channelCount.valueOr(options.numberOfOutputs));
     48    if (result.hasException())
     49        return result.releaseException();
     50   
     51    result = splitter->setChannelCountMode(options.channelCountMode.valueOr(ChannelCountMode::Explicit));
     52    if (result.hasException())
     53        return result.releaseException();
     54   
     55    result = splitter->setChannelInterpretation(options.channelInterpretation.valueOr(ChannelInterpretation::Discrete));
     56    if (result.hasException())
     57        return result.releaseException();
     58   
     59    return splitter;
    4660}
    4761
     
    87101}
    88102
     103ExceptionOr<void> ChannelSplitterNode::setChannelCount(unsigned channelCount)
     104{
     105    if (channelCount != numberOfOutputs())
     106        return Exception { IndexSizeError, "Channel count must be set to number of outputs."_s };
     107   
     108    return AudioNode::setChannelCount(channelCount);
     109}
     110
     111ExceptionOr<void> ChannelSplitterNode::setChannelCountMode(ChannelCountMode mode)
     112{
     113    if (mode != ChannelCountMode::Explicit)
     114        return Exception { InvalidStateError, "Channel count mode cannot be changed from explicit."_s };
     115   
     116    return AudioNode::setChannelCountMode(mode);
     117}
     118
     119ExceptionOr<void> ChannelSplitterNode::setChannelInterpretation(ChannelInterpretation interpretation)
     120{
     121    if (interpretation != ChannelInterpretation::Discrete)
     122        return Exception { InvalidStateError, "Channel interpretation cannot be changed from discrete."_s };
     123   
     124    return AudioNode::setChannelInterpretation(interpretation);
     125}
     126
    89127} // namespace WebCore
    90128
  • trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.h

    r263410 r265002  
    2626
    2727#include "AudioNode.h"
     28#include "ChannelSplitterOptions.h"
    2829
    2930namespace WebCore {
     
    3435    WTF_MAKE_ISO_ALLOCATED(ChannelSplitterNode);
    3536public:
    36     static RefPtr<ChannelSplitterNode> create(BaseAudioContext&, float sampleRate, unsigned numberOfOutputs);
     37    static ExceptionOr<Ref<ChannelSplitterNode>> create(BaseAudioContext&, const ChannelSplitterOptions& = { });
    3738
    3839    // AudioNode
    3940    void process(size_t framesToProcess) override;
    4041    void reset() override;
     42   
     43    ExceptionOr<void> setChannelCount(unsigned) final;
     44    ExceptionOr<void> setChannelCountMode(ChannelCountMode) final;
     45    ExceptionOr<void> setChannelInterpretation(ChannelInterpretation) final;
    4146
    4247private:
  • trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl

    r149920 r265002  
    2727    JSGenerateToJSObject
    2828] interface ChannelSplitterNode : AudioNode {
     29    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelSplitterOptions options);
    2930};
  • trunk/Source/WebCore/Sources.txt

    r264941 r265002  
    27102710JSChannelInterpretation.cpp
    27112711JSChannelMergerNode.cpp
     2712JSChannelMergerOptions.cpp
    27122713JSChannelSplitterNode.cpp
     2714JSChannelSplitterOptions.cpp
    27132715JSCharacterData.cpp
    27142716JSChildNode.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r264941 r265002  
    1585415854                E7CF84A524C635F400B06B90 /* OfflineAudioContextOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OfflineAudioContextOptions.h; sourceTree = "<group>"; };
    1585515855                E7CF84A724C635F400B06B90 /* OfflineAudioContextOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = OfflineAudioContextOptions.idl; sourceTree = "<group>"; };
     15856                E7E0352024CF60ED008DFEFB /* ChannelMergerOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChannelMergerOptions.h; sourceTree = "<group>"; };
     15857                E7E0352224CF60ED008DFEFB /* ChannelMergerOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChannelMergerOptions.idl; sourceTree = "<group>"; };
     15858                E7E0352424CF715E008DFEFB /* ChannelSplitterOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChannelSplitterOptions.h; sourceTree = "<group>"; };
     15859                E7E0352524CF715E008DFEFB /* ChannelSplitterOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChannelSplitterOptions.idl; sourceTree = "<group>"; };
    1585615860                EB081CD81696084400553730 /* TypeConversions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeConversions.h; sourceTree = "<group>"; };
    1585715861                EB081CD91696084400553730 /* TypeConversions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TypeConversions.idl; sourceTree = "<group>"; };
     
    2947929483                                FD315FB512B0267500C1A359 /* ChannelMergerNode.h */,
    2948029484                                FD315FB612B0267500C1A359 /* ChannelMergerNode.idl */,
     29485                                E7E0352024CF60ED008DFEFB /* ChannelMergerOptions.h */,
     29486                                E7E0352224CF60ED008DFEFB /* ChannelMergerOptions.idl */,
    2948129487                                FD315FB712B0267500C1A359 /* ChannelSplitterNode.cpp */,
    2948229488                                FD315FB812B0267500C1A359 /* ChannelSplitterNode.h */,
    2948329489                                FD315FB912B0267500C1A359 /* ChannelSplitterNode.idl */,
     29490                                E7E0352424CF715E008DFEFB /* ChannelSplitterOptions.h */,
     29491                                E7E0352524CF715E008DFEFB /* ChannelSplitterOptions.idl */,
    2948429492                                FD315FDE12B0267600C1A359 /* ConvolverNode.cpp */,
    2948529493                                FD315FDF12B0267600C1A359 /* ConvolverNode.h */,
Note: See TracChangeset for help on using the changeset viewer.