Closed Bug 1456265 Opened 6 years ago Closed 6 years ago

ChannelSplitter constructor gives incorrect values

Categories

(Core :: Web Audio, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: toy.raymond, Assigned: padenot)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce:

First, new ChannelSplitterNode(context) produces a node with channelCount = 2, channelCountMode = "max", and channelInterpretation = "speakers".  The spec says the channelCount should be 6, mode = "explicit", and interpretation = "discrete".

Also, if you do new ChannelSplitterNode(context, {numberOfOutputs: 17}), the channelCount should be set to 17 but it's still set to 2.
Component: Untriaged → Web Audio
Product: Firefox → Core
Rank: 15
Priority: -- → P2
See Also: → 1443224
The second problem is fixed on trunk, this patch fixes the first one (the default values). This is covered by existing web-platform-tests.
Assignee: nobody → padenot
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 8981472 [details]
Bug 1456265 - Make ChannelSplitterNode have a channelCountMode of "explicit" and a channelIntepretation of "discrete" by default.

https://reviewboard.mozilla.org/r/247580/#review253630

::: dom/media/webaudio/ChannelSplitterNode.cpp:56
(Diff revision 1)
>  };
>  
>  ChannelSplitterNode::ChannelSplitterNode(AudioContext* aContext,
>                                           uint16_t aOutputCount)
>    : AudioNode(aContext,
>                2,

The description of the bug (and the MDN) says that channelCount should be 6.
Comment on attachment 8981472 [details]
Bug 1456265 - Make ChannelSplitterNode have a channelCountMode of "explicit" and a channelIntepretation of "discrete" by default.

https://reviewboard.mozilla.org/r/247580/#review253636

Looks good, thanks
Attachment #8981472 - Flags: review?(achronop) → review+
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/autoland/rev/9e1a3230d085
Make ChannelSplitterNode have a channelCountMode of "explicit" and a channelIntepretation of "discrete" by default. r=achronop
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0ae2e92fead5
Make ChannelSplitterNode have a channelCountMode of "explicit" and a channelIntepretation of "discrete" by default. r=achronop
https://hg.mozilla.org/integration/mozilla-inbound/rev/be22684cddb8
Update the WPT expectation file, the ChannelSplitterNode tests are now passing.
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ee0c4548a78a
Also update test_channelSplitterNodeWithVolume.html
Backed out 5 changesets (bug 1456265, bug 1456946) for breaking WPT test. CLOSED TREE

Log:
https://treeherder.mozilla.org/logviewer.html#?job_id=180950155&repo=mozilla-inbound&lineNumber=5484

 INFO - TEST-PASS | /webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html | > [1-channel input] produces 1-channel output 
[task 2018-05-30T17:32:32.224Z] 17:32:32     INFO - TEST-UNEXPECTED-FAIL | /webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html | X 1: Channel 1: Expected 0 for all values but found 1279 unexpected values: 
[task 2018-05-30T17:32:32.224Z] 17:32:32     INFO - 	Index	Actual
[task 2018-05-30T17:32:32.224Z] 17:32:32     INFO - 	[1]	-2.9802322387695312e-8
[task 2018-05-30T17:32:32.225Z] 17:32:32     INFO - 	[2]	0.33110618591308594
[task 2018-05-30T17:32:32.226Z] 17:32:32     INFO - 	[3]	0.6248594522476196
[task 2018-05-30T17:32:32.226Z] 17:32:32     INFO - 	[4]	0.8481202721595764
[task 2018-05-30T17:32:32.226Z] 17:32:32     INFO - 	...and 1275 more errors. - assert_true: expected true got false
[task 2018-05-30T17:32:32.226Z] 17:32:32     INFO - _logFailed/<@http://web-platform.test:8000/webaudio/resources/audit.js:44:7
[task 2018-05-30T17:32:32.226Z] 17:32:32     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1538:20
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - test@http://web-platform.test:8000/resources/testharness.js:548:9
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - _logFailed@http://web-platform.test:8000/webaudio/resources/audit.js:43:5
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - _finalize@http://web-platform.test:8000/webaudio/resources/audit.js:206:9
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - _assert@http://web-platform.test:8000/webaudio/resources/audit.js:219:7
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - beConstantValueOf@http://web-platform.test:8000/webaudio/resources/audit.js:640:14
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - @http://web-platform.test:8000/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html:99:19
[task 2018-05-30T17:32:32.227Z] 17:32:32     INFO - promise callback*@http://web-platform.test:8000/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html:91:13
[task 2018-05-30T17:32:32.228Z] 17:32:32     INFO - run@http://web-platform.test:8000/webaudio/resources/audit.js:1158:7
[task 2018-05-30T17:32:32.228Z] 17:32:32     INFO - _runNextTask@http://web-platform.test:8000/webaudio/resources/audit.js:1217:9
[task 2018-05-30T17:32:32.228Z] 17:32:32     INFO - done@http://web-platform.test:8000/webaudio/resources/audit.js:1188:7
[task 2018-05-30T17:32:32.228Z] 17:32:32     INFO - @http://web-platform.test:8000/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html:48:13
[task 2018-05-30T17:32:32.229Z] 17:32:32     INFO - run@http://web-platform.test:8000/webaudio/resources/audit.js:1158:7
[task 2018-05-30T17:32:32.229Z] 17:32:32     INFO - _runNextTask@http://web-platform.test:8000/webaudio/resources/audit.js:1217:9
[task 2018-05-30T17:32:32.229Z] 17:32:32     INFO - run@http://web-platform.test:8000/webaudio/resources/audit.js:1287:7
[task 2018-05-30T17:32:32.229Z] 17:32:32     INFO - @http://web-platform.test:8000/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html:229:7
[task 2018-05-30T17:32:32.230Z] 17:32:32     INFO - 
[task 2018-05-30T17:32:32.230Z] 17:32:32     INFO - TEST-PASS | /webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html |   Convolver output equals [0,0,0.3311063051223755,0.6248595118522644,0.8481203317642212,0.9757021069526672,0.9932119250297546,0.8986744284629822,0.7027547359466553,0.42755505442619324,0.1041216030716896,-0.23105813562870026,-0.5401715040206909,-0.7883464694023132,-0.9475855827331543,-0.9999247193336487...] with an element-wise tolerance of {"absoluteThreshold":4.1724e-7,"relativeThreshold":0}. 
[task 2018-05-30T17:32:32.231Z] 17:32:32     INFO - TEST-UNEXPECTED-FAIL | /webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html | < [1-channel input] 1 out of 2 assertions were failed. - assert_true: expected true got false
[task 2018-05-30T17:32:32.231Z] 17:32:32     INFO - _logFailed/<@http://web-platform.test:8000/webaudio/resources/audit.js:44:7

Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=be22684cddb8ecf3caebb1d77e0aae42a4859b92&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-classifiedState=unclassified

Backout:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad5c73d02164b695c1e2036bf90fad730042a251
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e11654f5f36b
Update expectations for convolver-response-1-chan.html.
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ebfc3c04016a
Make ChannelSplitterNode have a channelCountMode of "explicit" and a channelIntepretation of "discrete" by default. r=achronop
https://hg.mozilla.org/integration/mozilla-inbound/rev/2844a12783a0
Update the WPT expectation file, the ChannelSplitterNode tests are now passing.
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb7cba7e1120
Also update test_channelSplitterNodeWithVolume.html
Backout by aciure@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/21e2f0577dee
Backed out 6 changesets (bug 1456265, bug 1468822, bug 1456946) for failing Linux wpt tests convolver-response-1-chan.html a=backout on a  CLOSED TREE
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/190899b047d2
Make ChannelSplitterNode have a channelCountMode of "explicit" and a channelIntepretation of "discrete" by default. r=achronop
https://hg.mozilla.org/integration/mozilla-inbound/rev/4db081326272
Update the WPT expectation file, the ChannelSplitterNode tests are now passing.
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e29b22bdc87
Also update test_channelSplitterNodeWithVolume.html
Flags: needinfo?(padenot)
Documentation updated:

https://developer.mozilla.org/en-US/docs/Web/API/ChannelSplitterNode (updated to correct the channel interpretation to "discrete")

https://developer.mozilla.org/en-US/Firefox/Releases/62 (note the fixed default values of channelCountMode, channelInterpretation, and channelCount)
You need to log in before you can comment on or make changes to this bug.