Skip to content

Comments

feat: opus support via libopus and allow registering additional codecs#851

Open
aschey wants to merge 12 commits intoRustAudio:masterfrom
aschey:feat/registry
Open

feat: opus support via libopus and allow registering additional codecs#851
aschey wants to merge 12 commits intoRustAudio:masterfrom
aschey:feat/registry

Conversation

@aschey
Copy link
Contributor

@aschey aschey commented Feb 22, 2026

Supersedes #806

Resolves #38

Thanks @royalmustard for starting on this! I took the changes from the previous PR and made a few tweaks:

  • Exposes a method to add a decoder to the existing registry instead. This is more difficult to misuse because it's easy to forget to re-enable the default codecs when creating a completely new registry.
  • Adds opus support via the symphonia-libopus flag. Opus support is a common enough request that I think it makes sense to support this via a flag rather than require users to add the codec manually.
  • Bumps the MSRV so CI can pass (discussed here).
  • Adds a different third-party codec example using symphonia-adapter-fdk-aac (FDK supports HE-AAC which is currently not supported by Symphonia's AAC implementation).

wasm-bindgen = ["cpal/wasm-bindgen"]

# Base symphonia feature (doesn't enable any codecs)
symphonia = ["dep:symphonia"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that there are a lot of places that use #[cfg(feature = "symphonia")] even though there was no feature named symphonia. A feature with this name was created implicitly due to the other features that reference symphonia/xxx. For symphonia-libopus, I wanted to make sure the base symphonia feature was also enabled, so we need to make this feature explicit now.

@aschey aschey force-pushed the feat/registry branch 2 times, most recently from 4d34fa3 to d73d0e8 Compare February 22, 2026 18:41
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.

Add an Opus decoder

2 participants