Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify format of buffer we're copying into #858

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jyavenard
Copy link
Member

Per spec https://w3c.github.io/webcodecs/#dom-audiodatacopytooptions-format if the format is not specified, we are to use the same format as the source. Which could be interleaved as the format for decoding isn't specified.

Calling copyTo with a planeIndex of 0 with an interleaved buffer will attempt to copy all planes.

So we just set the destination format to be f32-planar.

This allows playback to start on browsers that aren't Blink based (Firefox, Safari)

Per spec https://w3c.github.io/webcodecs/#dom-audiodatacopytooptions-format if the format is not specified, we are to use the same format as the source.
Which could be interleaved as the format for decoding isn't specified.

Calling copyTo with a planeIndex of 0 with an interleaved buffer will attempt to copy all planes.

So we just set the destination format to be f32-planar.

This allows playback to start on browsers that aren't Blink based (Firefox, Safari)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant