Improve interpolation in ABSN |
||
Issue descriptionIf the AudioBuffer associated with an ABSN has a sample rate that differs from the corresponding context, linear interpolation is used. However, when we get to the end of the buffer where we want to interpolate between the last element of the buffer and the next, we can't because there is no next element. Then we just use the last element value. We could probably improve on this by extrapolating between the last element and the next to the last to produce a new value past the last element. If the sample rate isn't huge, this is probably a nice improvement. Maybe a simple Lagrange interpolator would be ok for doing the extrapolation?
,
Sep 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/feaba58ccedc657f5d4ee23c5b11825de876bf0f commit feaba58ccedc657f5d4ee23c5b11825de876bf0f Author: Raymond Toy <rtoy@chromium.org> Date: Fri Sep 07 15:51:21 2018 Slightly improve AudioBuffer resampling Use simple linear extrapolation to resample the data when we reach the end of the buffer. Previously, the last sample would just be repeated enough times. Manually verified that the test passes on Firefox (nightly) and fails on Chrome without this CL. Bug: 881119 Test: the-audiobuffersourcenode-interface/buffer-resampling.html Change-Id: I1eb6ee089aa5477e03ff7184eb974f769b739528 Reviewed-on: https://chromium-review.googlesource.com/1211910 Commit-Queue: Raymond Toy <rtoy@chromium.org> Reviewed-by: Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#589529} [add] https://crrev.com/feaba58ccedc657f5d4ee23c5b11825de876bf0f/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html [modify] https://crrev.com/feaba58ccedc657f5d4ee23c5b11825de876bf0f/third_party/blink/renderer/modules/webaudio/audio_buffer_source_node.cc
,
Sep 11
|
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Sep 6