You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently calling AudioBuffer: copyToChannel(source, channelNumber) with a source backed by a SharedArrayBuffer is disallowed. In Chrome you get the following crash: Failed to execute 'copyToChannel' on 'AudioBuffer': The provided Float32Array value must not be shared.
This is a footgun when working with WebAssembly. Creating a Float32Array backed by the Wasm memory and passing that in to copyToChannel works fine unless the Wasm memory is backed by a SharedArrayBuffer.
This has resulted in bugs like this one, which impacts a popular audio library from the Rust ecosystem: RustAudio/cpal#656
Should calls like copyToChannel be allowed to accept shared Float32Arrays or is it necessary to forbid them?
The text was updated successfully, but these errors were encountered:
Copying the data into an active buffer is not allowed according to "acquire content" process.
Chromium doesn't have a complete implementation of this feature yet. (WPT)
Next steps:
Figure out if this is possible on each browser implementation. If this is not really feasible, we need more discussion.
hoch
added
Needs Edits
Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/
Needs Discussion
The issue needs more discussion before it can be fixed.
and removed
Needs Discussion
The issue needs more discussion before it can be fixed.
Needs Edits
Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/
labels
Jul 24, 2024
Presently calling
AudioBuffer: copyToChannel(source, channelNumber)
with a source backed by aSharedArrayBuffer
is disallowed. In Chrome you get the following crash:Failed to execute 'copyToChannel' on 'AudioBuffer': The provided Float32Array value must not be shared.
This is a footgun when working with WebAssembly. Creating a
Float32Array
backed by the Wasm memory and passing that in tocopyToChannel
works fine unless the Wasm memory is backed by aSharedArrayBuffer
.This has resulted in bugs like this one, which impacts a popular audio library from the Rust ecosystem: RustAudio/cpal#656
Should calls like
copyToChannel
be allowed to accept sharedFloat32Array
s or is it necessary to forbid them?The text was updated successfully, but these errors were encountered: