Closed Bug 1456269 Opened 2 years ago Closed 1 year ago

Construct OscillatorNode with PeriodicWave fails

Categories

(Core :: Web Audio, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: toy.raymond, Assigned: valentin.millet39)

References

Details

Attachments

(2 files)

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:

Run

c = new AudioContext()
p = new PeriodicWave(context, {real: [1, 1]});
n0 = new OscillatorNode(context, {periodicWave: p})
n1 = new OscillatorNode(context, {type: "custom", periodicWave: p})


Actual results:

Construction of n0 works, but construction of n1 fails,


Expected results:

Construction of both n0 and n1 should work.

I'm guessing the code disallows setting the type if periodicWave is also given.  But we're setting the type to "custom", which is what the type of an OscillatorNode should be when a periodicWave is given.  Thus, I think this should work.

The spec says that type is ignored if periodicWave is specified.
Component: Untriaged → Web Audio
Product: Firefox → Core
Rank: 15
Priority: -- → P2
See Also: → 1443224
Assignee: nobody → valentin.millet39
Status: UNCONFIRMED → NEW
Ever confirmed: true
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6eadff042177
Construct OscillatorNode with PeriodicWave and type custom works. r=padenot
https://hg.mozilla.org/integration/autoland/rev/3db3093b0977
Remove expectations files for WPT ctor-oscillator.html.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.