Closed Bug 1443228 Opened 7 years ago Closed 7 years ago

Convolver should throw NotSupportedError for invalid channel count

Categories

(Core :: Web Audio, defect, P3)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox58 --- wontfix
firefox59 --- wontfix
firefox60 --- fixed

People

(Reporter: toy.raymond, Assigned: padenot)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.106 Safari/537.36 Steps to reproduce: Run this: c = new AudioContext(); b = new AudioBuffer({length: 1, numberOfChannels: 3, sampleRate: c.sampleRate}); n = new ConvolverNode(c) n.buffer = b Actual results: A SyntaxError is thrown when setting the buffer to b. Expected results: A NotSupportedError must be thrown: https://webaudio.github.io/web-audio-api/#dom-convolvernode-buffer
Hi toy.raymond, Did you run this script in Browser Console?
Flags: needinfo?(toy.raymond)
Copy from the spec: "The AudioBuffer MUST have 1, 2, or 4 channels or a NotSupportedError exception MUST be thrown."
Status: UNCONFIRMED → NEW
Component: Untriaged → Web Audio
Ever confirmed: true
Flags: needinfo?(toy.raymond)
Priority: -- → P3
Product: Firefox → Core
This is reproducible also on Mac OS X 10.12 with FF 58 and FF Nightly 60.0a1(2018-03-07).
OS: Unspecified → All
Hardware: Unspecified → All
Comment on attachment 8957114 [details] Bug 1443228 - Make the ConvolverNode ctor throw NotSupportedError when passed a buffer with an invalid channel count. https://reviewboard.mozilla.org/r/226054/#review232168
Attachment #8957114 - Flags: review?(karlt) → review+
Pushed by paul@paul.cx: https://hg.mozilla.org/integration/autoland/rev/0a5ec71513a7 Make the ConvolverNode ctor throw NotSupportedError when passed a buffer with an invalid channel count. r=karlt
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
I've added details about the NotSupportedError to the constructor ref page: https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/ConvolverNode#Exceptions I've also added a note to the Fx60 rel notes: https://developer.mozilla.org/en-US/Firefox/Releases/60#Media_and_WebRTC Let me know if this looks OK. Thanks!
Flags: needinfo?(padenot)
Perfect as usual, Chris, thanks!
Flags: needinfo?(padenot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: