Closed Bug 1644847 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 24093 - Avoid memory allocation in AudioWorkletProcessor.process()

Categories

(Core :: Web Audio, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 24093 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/24093
Details from upstream follow.

Hongchan Choi <hongchan@chromium.org> wrote:

Avoid memory allocation in AudioWorkletProcessor.process()

Based on the spec 1, the current implementation of
AudioWorkletProcessor needs to create a new data container
(i.e. WebIDL sequence\<>) for input, output, and param arrays.

With the new spec change 2, this CL changes the overall design
of the audio processing callback:

  1. Moves the processing call from AudioWorkletGlobalScope to
    AudioWorkletProcessor object.
  2. AudioWorkletProcessor now keeps the data container within
    the object and allocate memory when it is needed.

The preliminary benchmark shows the sizable improvement in the
audio stream quality. The glitch score
(= buffer underrun/total callback) is improved by ~9x in the
low-tier machine.

Bug: 1086665
Change-Id: I3e664754973d4d86649d38c1807c6b9d7830fb96
Reviewed-on: https://chromium-review.googlesource.com/2218702
WPT-Export-Revision: b29112b661f22f878161ef42b1955f5287d2837f

Component: web-platform-tests → Web Audio
Product: Testing → Core
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ce989e05dbc
[wpt PR 24093] - Avoid memory allocation in AudioWorkletProcessor.process(), a=testonly
https://hg.mozilla.org/integration/autoland/rev/3b84d46b5df4
[wpt PR 24093] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Regressions: 1647750
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Regressions: 1647714
You need to log in before you can comment on or make changes to this bug.