Bug 216790

Summary: AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, ggaren, jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://www.w3.org/TR/webaudio/#dom-audioparam-exponentialramptovalueattime
Bug Depends on: 216788    
Bug Blocks: 212611    
Attachments:
Description Flags
Patch eric.carlson: review+, ews-feeder: commit-queue-

Description Chris Dumez 2020-09-21 10:54:45 PDT
AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values.
The specification [1] says:
"If V0 and V1 have opposite signs or if V0 is zero, then v(t) = V0 for T0 <= t < T1."

Our implementation did not match the specification and would just special-case if either V0 or V1 was negative.

[1] https://www.w3.org/TR/webaudio/#dom-audioparam-exponentialramptovalueattime
Comment 1 Chris Dumez 2020-09-21 10:59:13 PDT
Created attachment 409284 [details]
Patch
Comment 2 Chris Dumez 2020-09-21 14:17:52 PDT
Committed r267367: <https://trac.webkit.org/changeset/267367>
Comment 3 Radar WebKit Bug Importer 2020-09-21 14:18:20 PDT
<rdar://problem/69327008>