Skip to content

Commit 03a2457

Browse files
Mahesh Bharadwaj Kannanchromium-wpt-export-bot
authored andcommitted
[Webaudio]: Fix reverse interpolation and wrap around (Step 2)
This is the final incremental step (2/2) for negative playbackRate support. It updates the linear interpolation path to correctly handle backwards direction using a virtual_start_frame bound and correctly calculates sub-sample rendering in reverse without rounding errors. The previous optimization rounding grain_offset to an integer frame is now bypassed when playbackRate is not strictly 1.0, preserving the sub-sample position for correct backward playback tests. Because all the expected WPT failures for negative playback rates have now been resolved, the -expected.txt baseline file is deleted. Bug: 40719652 Change-Id: Icac5f0ab9697bb6e198ecd237b1e7e22f4edd870 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7879375 Commit-Queue: Mahesh Kannan <kmaheshb@google.com> Reviewed-by: Michael Wilson <mjwilson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1651112}
1 parent f87a484 commit 03a2457

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-playbackrate-dynamic-direction.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
source.playbackRate.setValueAtTime(1.0, 128 / 44100);
2222
source.connect(context.destination);
2323

24-
source.start(0, 255);
24+
source.start(0, 255 / 44100);
2525

2626
let renderedBuffer = await context.startRendering();
2727
let renderedData = renderedBuffer.getChannelData(0);

0 commit comments

Comments
 (0)