Skip to content

Define AudioDataCopyToOptions with frameOffset and frameCount #228

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

Merged
merged 7 commits into from
May 26, 2021

Conversation

chcunningham
Copy link
Collaborator

@chcunningham chcunningham commented May 6, 2021

@chcunningham chcunningham requested review from padenot and aboba May 6, 2021 00:46
Copy link
Collaborator

@padenot padenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be easier to decide how this needs to work when the output format is specced precisely.

@dalecurtis
Copy link
Contributor

+1 to adding the sample format to the copyTo options or also having a convertTo(format, options). These are all easy to convert, but as an implementation quality issue a NotSupportedError could be thrown if an implementation doesn't support it for now.

index.src.html Outdated
|options|.{{AudioDataCopyToOptions/planeIndex}}.

NOTE: For interleaved formats with a single plane, |frameCount| will
be the total number of frames accross all channels.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the sample count then, if it's across all channels. A frame count is specifically channel-count independent.

This steps should be about finding a number of elements to copy, based on the various parameters passed as parameter. Then the caller simply copies.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, hopefully fixed! Algo now returns number of elements, including multiplication by channel count for interleaved formats.

Copy link
Collaborator Author

@chcunningham chcunningham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Paul

index.src.html Outdated
|options|.{{AudioDataCopyToOptions/planeIndex}}.

NOTE: For interleaved formats with a single plane, |frameCount| will
be the total number of frames accross all channels.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, hopefully fixed! Algo now returns number of elements, including multiplication by channel count for interleaved formats.

@padenot
Copy link
Collaborator

padenot commented May 26, 2021

Looks good, thanks! Can you rebase it so I can rebase #256 and merge it?

@chcunningham
Copy link
Collaborator Author

Editors call: @aboba says LGTM

@chcunningham
Copy link
Collaborator Author

Thanks! Rebased and proceeding to merge.

@chcunningham chcunningham merged commit 0db2aae into main May 26, 2021
@chcunningham chcunningham deleted the audiodata_readpcm branch May 26, 2021 21:44
github-actions bot added a commit that referenced this pull request May 26, 2021
SHA: 0db2aae
Reason: push, by @chcunningham

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request May 26, 2021
SHA: 0db2aae
Reason: push, by @chcunningham

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request May 26, 2021
SHA: 0db2aae
Reason: push, by @chcunningham

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request May 26, 2021
SHA: 0db2aae
Reason: push, by @tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request May 26, 2021
SHA: 0db2aae
Reason: push, by @tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request May 26, 2021
SHA: 0db2aae
Reason: push, by @tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Reading back a PCM data from an AudioData object Audio decoder output to regular buffers and not AudioBuffer
3 participants