Bug 215905

Summary: AudioParam's minValue / maxValue are ignored
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 212611    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Chris Dumez 2020-08-27 16:33:56 PDT
AudioParam's minValue / maxValue are ignored, we never use them to actually clamp the AudioParam's values.
Comment 1 Chris Dumez 2020-08-27 16:36:33 PDT
Created attachment 407433 [details]
Patch
Comment 2 Chris Dumez 2020-08-27 16:49:52 PDT
Created attachment 407436 [details]
Patch
Comment 3 Darin Adler 2020-08-27 17:46:56 PDT
Comment on attachment 407436 [details]
Patch

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

> Source/WebCore/Modules/webaudio/AudioParamTimeline.h:55
> +    float valueForContextTime(BaseAudioContext&, float defaultValue, float minValue, float maxValue, bool& hasValue);

Seems like we’d use optional for this instead of a "hasValue" out argument if we were writing the code rather than importing code already written.

> Source/WebCore/Modules/webaudio/AudioParamTimeline.h:62
> +    float valuesForTimeRange(Seconds startTime, Seconds endTime, float defaultValue, float minValue, float maxValue, float* values, unsigned numberOfValues, double sampleRate, double controlRate);

Eventually such a large number of arguments starts calling for use of a structure.
Comment 4 Chris Dumez 2020-08-27 19:07:43 PDT
Created attachment 407445 [details]
Patch
Comment 5 EWS 2020-08-27 19:56:50 PDT
Committed r266270: <https://trac.webkit.org/changeset/266270>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407445 [details].
Comment 6 Radar WebKit Bug Importer 2020-08-27 19:57:18 PDT
<rdar://problem/67914254>