Bug 175112
Summary: | AudioParam.setValueCurveAtTime should use linear interpolation, not nearest neighbor | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ricci Adams <webkit.org> |
Component: | Web Audio | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | jer.noble, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 10 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ricci Adams
Based on testing and a brief code examination of AudioParamTimeline.cpp, AudioParam.setValueCurveAtTime is performing nearest neighbor sampling for missing values, rather than linear interpolation.
Per the WebAudio specification, linear interpolation should be used:
https://webaudio.github.io/web-audio-api/#widl-AudioParam-setValueCurveAtTime-AudioParam-sequence-float--values-double-startTime-double-duration
Chrome 46+ and Firefox use linear interpolation.
My test case involved making a Float32 array with 2 values: 1.0 and 0.0. I then used this on a GainNode to perform a fadeout. Expected behavior was a fadeout, actual behavior was immediate silence.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/33693466>