androidx / androidx/media

Support more offload formats in platform

Open
#3,195 2 comments 0 reactions 1 assignee View on GitHub

@tonihei is already working on this.

Since May 5, 2026.

enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

In: https://docs.google.com/document/d/1r6wi6OtJUaI1QU8QLrLJTZieQBFTN1fyBK4U_PoPp3g/edit?tab=t.0#heading=h.qf4jwg32a4jc

It was said that more offload format constants can be added on request. Thus I would like to request Vorbis, FLAC and ALAC constants in android.media.AudioFormat.

Vorbis and FLAC are natively supported by the Android platform for software decoding, and Qualcomm platforms also support offloading these formats:

https://git.codelinaro.org/clo/la/platform/hardware/qcom/audio/-/blob/LA.UM.7.2.c28-00700-8x98.0/configs/kona/audio_policy_configuration.xml#L102

ALAC is not natively supported in Android, but it has been somewhat popular among by app's userbase so I added a pure-java software decoder plugin to my app. (There is also the official FFmpeg extension for ExoPlayer that could be used.) It is also supported by Qualcomm platforms.

In practice, MediaPlayer can use offload with files in these formats while ExoPlayer can't, and the reason is that the constants are not in the SDK - if they were, only very minor work would need to be done to make offload work with these formats in ExoPlayer. Thus, it would be great if there could be constants added to android.media.AudioFormat - thank you for considering ths.

(Optionally, WMA, WMA Pro and APE would also be supported by Qualcomm platforms and thus a public AudioFormat entry could benefit some apps, but those use containers which are not supported by ExoPlayer and usage is marginal. Other than these six formats, all AudioFormat constants are already there.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.