Bug 215905 - AudioParam's minValue / maxValue are ignored
Summary: AudioParam's minValue / maxValue are ignored
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 212611
  Show dependency treegraph
 
Reported: 2020-08-27 16:33 PDT by Chris Dumez
Modified: 2020-08-27 19:57 PDT (History)
10 users (show)

See Also:


Attachments
Patch (50.48 KB, patch)
2020-08-27 16:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (50.50 KB, patch)
2020-08-27 16:49 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (51.38 KB, patch)
2020-08-27 19:07 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>