Skip to content

Clarify AudioEncoderConfig.sampleRate semantics #370

@chcunningham

Description

@chcunningham

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    editorialchanges to wording, grammar, etc that don't modify the intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions