Bug 82160 - Add exception for the setter of value in AudioParam
Summary: Add exception for the setter of value in AudioParam
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 19:06 PDT by Gao Chun
Modified: 2012-04-19 15:51 PDT (History)
7 users (show)

See Also:


Attachments
Patch (12.13 KB, patch)
2012-04-06 05:04 PDT, Gao Chun
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gao Chun 2012-03-25 19:06:27 PDT
If a value is set outside the allowable range described by minValue and maxValue an exception is thrown.
Comment 1 Gao Chun 2012-04-06 05:04:44 PDT
Created attachment 136004 [details]
Patch
Comment 2 Build Bot 2012-04-06 05:30:04 PDT
Comment on attachment 136004 [details]
Patch

Attachment 136004 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12337826
Comment 3 Chris Rogers 2012-04-06 16:46:18 PDT
Comment on attachment 136004 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=136004&action=review

Hi Chun, sorry for the trouble but after some careful thought I don't think we should throw exceptions for values outside the range minValue and maxValue.  This is because it will soon become possible to send "audio-rate" signals directly to params and even have negative frequencies (for FM synthesis, etc.)

I realize that the spec says it should throw an exception, but I believe this is wrong and the spec should change.

Throwing and exception for NaN and Inf still seems Ok

> Source/WebCore/Modules/webaudio/AudioGain.h:51
> +

I don't think we need to special-case AudioGain - please see below.
Comment 4 Gao Chun 2012-04-08 21:47:44 PDT
Thanks.I Make it invalid.
Comment 5 Eric Seidel (no email) 2012-04-19 15:51:34 PDT
Comment on attachment 136004 [details]
Patch

Cleared review? from attachment 136004 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).