New issue
Advanced search Search tips

Issue 881119 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 11
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Improve interpolation in ABSN

Project Member Reported by rtoy@chromium.org, Sep 5

Issue description

If 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?
 
Components: Blink>WebAudio
forgot to add component.
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Owner: rtoy@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment