Bug 216093

Summary: Don't modify the response when creating a ConvolverNode
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, peng.liu6, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=216118
Bug Depends on:    
Bug Blocks: 212611    
Attachments:
Description Flags
Patch
none
Patch eric.carlson: review+

Chris Dumez
Reported 2020-09-02 13:38:01 PDT
When creating a ConvolverNode with normalization (the default), the ConvolverNode was modifying the supplied AudioBuffer containing the desired impulse response. This happens because the normalization factor was applied to the buffer, convolver stages were computed, and then the normalization was undone. Due to floating-point roundoff, this can (and does) modify the buffer.
Attachments
Patch (112.52 KB, patch)
2020-09-02 13:50 PDT, Chris Dumez
no flags
Patch (16.57 KB, patch)
2020-09-02 13:55 PDT, Chris Dumez
eric.carlson: review+
Chris Dumez
Comment 1 2020-09-02 13:50:06 PDT
Chris Dumez
Comment 2 2020-09-02 13:55:41 PDT
Peng Liu
Comment 3 2020-09-02 14:33:36 PDT
Comment on attachment 407801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407801&action=review > Source/WebCore/platform/audio/FFTFrame.cpp:175 > + Nit. There is an extra blank line here? > LayoutTests/webaudio/convolvernode-unmodified-buffer.html:33 > + // response if it hasn't been fixed not to do that. Nit. The comment sounds strange. > LayoutTests/webaudio/convolvernode-unmodified-buffer.html:53 > + // better be unmodified. Ditto.
Chris Dumez
Comment 4 2020-09-02 15:12:04 PDT
Radar WebKit Bug Importer
Comment 5 2020-09-02 15:13:14 PDT
Note You need to log in before you can comment on or make changes to this bug.