Closed
Bug 1614019
Opened 6 years ago
Closed 5 years ago
AudioContext allows specifying a negative sampleRate
Categories
(Core :: Web Audio, defect, P3)
Core
Web Audio
Tracking
()
RESOLVED
FIXED
81 Branch
| Tracking | Status | |
|---|---|---|
| firefox81 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: nazarcf)
Details
Attachments
(3 files, 1 obsolete file)
Maybe this is intentional, but I would have expected this:
new AudioContext({sampleRate: -1 })
to throw, since that's smaller than MinSampleRate. In Firefox it does not throw, because the bounds checks on sampleRate are skipped if it's <= 0 in AudioContext::Constructor. Is that on purpose? It might be worth a comment explaining why.
Flags: needinfo?(padenot)
Updated•6 years ago
|
Component: Audio/Video → Web Audio
Flags: needinfo?(padenot)
Updated•6 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Assignee: nobody → nazarcf
Status: NEW → ASSIGNED
Updated•6 years ago
|
Attachment #9137323 -
Attachment description: Bug 1614019 - For an audioContext, a negative value of sampeRate now throws an exception r?padenot" → Bug 1614019 - For an audioContext, a negative value of sampeRate now throws an exception r?padenot
0 is not considered because this is the default value.
The condition in the if is changed because the minus operation could overflow.
The declaration of sampleRate has been moved to its next use because its first value was never used.
Updated•5 years ago
|
Attachment #9164298 -
Attachment description: Bug 1614019 - Added mochitest for negative duration. r?padenot → Bug 1614019 - Added mochitest for negative sample rate. r?padenot
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8b700a13395e
Removed negative value from the valid range r=padenot,webidl,smaug
https://hg.mozilla.org/integration/autoland/rev/18cf45575936
Added mochitest for negative sample rate. r=padenot
https://hg.mozilla.org/integration/autoland/rev/c5f74915fe26
Added wpt for negative sample rate. r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24825 for changes under testing/web-platform/tests
Comment 7•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8b700a13395e
https://hg.mozilla.org/mozilla-central/rev/18cf45575936
https://hg.mozilla.org/mozilla-central/rev/c5f74915fe26
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox81:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Upstream PR merged by moz-wptsync-bot
Updated•5 years ago
|
Attachment #9137323 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•