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

Clarify AudioEncoderConfig.sampleRate semantics #370

Open
chcunningham opened this issue Sep 29, 2021 · 0 comments
Open

Clarify AudioEncoderConfig.sampleRate semantics #370

chcunningham opened this issue Sep 29, 2021 · 0 comments
Labels
editorial changes to wording, grammar, etc that don't modify the intended behavior

Comments

@chcunningham
Copy link
Collaborator

chcunningham commented Sep 29, 2021

Semantics of AudioEncoderConfig.sampleRate are not that "we will encode with this sampleRate", but rather: "this is the sampleRate of our input". We may resample to a different rate where required by underlying encoder libraries. For example libopus only supports a handful of rates.

We should update the dict-member dfn to reflect this.

For concerns about resampling's affect on quality, please see
https://wiki.xiph.org/OpusFAQ#But_won.27t_the_resampler_hurt_the_quality.3F_Isn.27t_it_better_to_use_44.1_kHz_directly.3F

Aside: Chrome has a bug where AudioEncoder may emit an AudioDecoderConfig with incorrect sampleRate.
https://bugs.chromium.org/p/chromium/issues/detail?id=1254496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial changes to wording, grammar, etc that don't modify the intended behavior
Projects
None yet
Development

No branches or pull requests

1 participant