Why was max channel count handling changed to not check Spatializer anymore?
@tianyif is already working on this.
Since Nov 13, 2025.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Dolby codecs have an optimized downmix feature. If max output channels is not set, it will output stereo audio with downmix optimized for sound quality. If max output channels is set to >=12 instead the unmodified audio will be output. Spatializer requires full set of channels to work, so Dolby recommends to set max output channels on codec to 99 if spatialization is enabled:
https://professionalsupport.dolby.com/s/article/Enabling-Dolby-Atmos-in-Android-Mobile-media-apps?language=en_US
at "Important notice when targeting Android 12L (API level 32) and later."
However when spatialization is disabled the codec should do stereo downmix by just not setting max channel count. ("it's necessary to monitor if the spatializer status changes during playback. This can happen if the end user modifies the spatializer effect settings. In such cases, playback should be adjusted to reflect those changes.")
Since https://github.com/google/ExoPlayer/commit/0dd108046bef3be37c4a15bcc8e139be61e7571 ExoPlayer ignores the Spatializer API's opinion and just hardcoded max channel count to 99.
Is it possible to explain why it was done?
Thanks in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.