← Back to release summary

OfflineAudioContext incremental rendering

Category
Multimedia
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: WPTs are being implemented in https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-offlineaudiocontext-interface/: https://wpt.fyi/results/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-incremental-rendering.html?label=experimental&label=master&aligned https://wpt.fyi/results/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-incremental-rendering-data-integrity.html?label=experimental&label=master&aligned https://wpt.fyi/results/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-close.html?label=experimental&label=master&aligned

Summary

This feature adds an incremental rendering mechanism to OfflineAudioContext so that the audio graph data can be incrementally processed rather than allocating the whole audio buffer up front. By incrementally delivering the data using data chunks, there is no need to have high memory requirements for the user's machine when processing high amounts of data.

Motivation

The OfflineAudioContext API works well for rendering small audio graphs, but it does not scale for larger projects because it allocates the full graph's AudioBuffer up front. For example, rendering a 2-hour video composition project in clipchamp.com in an OfflineAudioContext would require an extremely large AudioBuffer allocation. The implication of this API is that a user's computer must have enough available memory to export the project even if the in-memory audio buffer will eventually be discarded after it is written to a file. In situations with limited hardware resources or low-powered devices, this limitation makes WebAudio unusable as an offline processor. If memory capacity is exceeded on a user's machine, then the processing will stop and the browser may terminate the tab/window leading to potential loss of data for the user and a poor user experience.

Standards & signals

Ecosystem

Samples: https://gabrielsanbrito.github.io/demo_pages/oac-incremental-rendering

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/OfflineAudioContext/explainer.md

View on chromestatus.com