Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
High-resolution audio
Stay organized with collections
Save and categorize content based on your preferences.
The Android 10 release includes the following
improvements for high-resolution audio:
- Float: WAV, FLAC codecs, and extractors are updated to support float
(24+ bits of lossless precision). Downmix and Virtualizer effects are updated to float.
Updated precision is allowed by MediaPlayer (NuPlayer).
- High-frequency: WAV, FLAC codecs, and extractors are updated to support 192 kHz.
The default Android supplied effects are tested for 192 kHz support at standard frequencies.
The standard frequencies permitted are 88.2 kHz, 96 kHz, 176.4 kHz, and
192 kHz.
- Multichannel: Default Android playback effects are tested for multichannel
support to eight channels.
- Timing: Timing information is included throughout the audio
framework.
Starting in Android 9, the following improvements
don't require any partner implementation:
- The number of simultaneous client output tracks increases from 14
to 40, as limited client instances of
AudioTrack
have been an issue for
apps in Android 8.x.
- Maximum client/server memory increases from 4 MB to 32 MB (depending
on total device memory) to allow more simultaneous high-resolution
audio tracks.
- Total mixed tracks increases from 32 to 256 to prevent resource
contention between apps and the System UI.
Output effect changes
See Audio
effects for Android 11 release changes.
Prior to the Android 9 release, effect chain processing
was implemented in stereo int16 sample format. This had several limitations:
- All output effects forced conversion from floating point audio data to
int16, causing loss of precision.
- Output effects were rejected from output sinks with a channel count
greater than two.
In the Android 9 release, the effect chain processing
pipeline is upgraded to support the multichannel float format. Key points:
- Android software effects are already migrated to stereo float.
- Legacy effects are supported with format adapters, which convert float
to int16 as needed.
Implement output effects
A reference implementation for output effects is available under
frameworks/av/media/libeffects
.
Partners implementing their own custom output effects should do the
following for the Android 10 release:
- Update output effects to support the multichannel float format:
- Int16 processing support is no longer required.
- Support output channel counts from 2–8 (for future compatibility
consider counts from 1–30).
- Support input channel counts matching output channel counts for
insert effects. Auxiliary effects continue to see an input channel
count of 1 (mono).
- Support both channel position masks (canonical) and channel index
masks of
(1 << n) - 1
.
- If you must continue to support legacy vendor output effects and can't
update them, then verify legacy code as follows:
- Legacy output (insert) effects must reject
unsupported configurations in
EFFECT_CMD_SET_CONFIG
.
- Check that the format is int16.
- Check that the input and output channel masks are stereo.
- If either check fails, return
-EINVAL
.
- Legacy output (auxiliary) effects are configured by AudioFlinger
with a mono input channel mask and potentially multichannel output
channel masks, depending on whether the output sink is multichannel.
They must reject unsupported configurations in
EFFECT_CMD_SET_CONFIG
.
- Check that the format is int16.
- Check that the input channel mask is mono and the output
channel mask is stereo.
- If either check fails, return
-EINVAL
.
- Verify legacy code. Don't assume that it works!
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# High-resolution audio\n\nThe Android 10 release includes the following\nimprovements for high-resolution audio:\n\n- **Float:** WAV, FLAC codecs, and extractors are updated to support float (24+ bits of lossless precision). Downmix and Virtualizer effects are updated to float. Updated precision is allowed by MediaPlayer (NuPlayer).\n- **High-frequency:** WAV, FLAC codecs, and extractors are updated to support 192 kHz. The default Android supplied effects are tested for 192 kHz support at standard frequencies. The standard frequencies permitted are 88.2 kHz, 96 kHz, 176.4 kHz, and 192 kHz.\n- **Multichannel:** Default Android playback effects are tested for multichannel support to eight channels.\n- **Timing:** Timing information is included throughout the audio framework.\n\nStarting in Android 9, the following improvements\ndon't require any partner implementation:\n\n- The number of simultaneous client output tracks increases from 14 to 40, as limited client instances of `AudioTrack` have been an issue for apps in Android 8.x.\n- Maximum client/server memory increases from 4 MB to 32 MB (depending on total device memory) to allow more simultaneous high-resolution audio tracks.\n- Total mixed tracks increases from 32 to 256 to prevent resource contention between apps and the System UI.\n\nOutput effect changes\n---------------------\n\nSee [Audio\neffects](/docs/core/audio/audio-effects) for Android 11 release changes.\n\nPrior to the Android 9 release, effect chain processing\nwas implemented in stereo int16 sample format. This had several limitations:\n\n- All output effects forced conversion from floating point audio data to int16, causing loss of precision.\n- Output effects were rejected from output sinks with a channel count greater than two.\n\nIn the Android 9 release, the effect chain processing\npipeline is upgraded to support the multichannel float format. Key points:\n\n- Android software effects are already migrated to stereo float.\n- Legacy effects are supported with format adapters, which convert float to int16 as needed.\n\nImplement output effects\n------------------------\n\nA reference implementation for output effects is available under\n`frameworks/av/media/libeffects`.\n\nPartners implementing their own custom output effects should do the\nfollowing for the Android 10 release:\n\n- Update output effects to support the multichannel float format:\n - Int16 processing support is no longer required.\n - Support output channel counts from 2--8 (for future compatibility consider counts from 1--30).\n - Support input channel counts matching output channel counts for insert effects. Auxiliary effects continue to see an input channel count of 1 (mono).\n - Support both channel position masks (canonical) and channel index masks of `(1 \u003c\u003c n) - 1`.\n- If you must continue to support legacy vendor output effects and can't update them, then verify legacy code as follows:\n - Legacy output (insert) effects **must reject** unsupported configurations in `EFFECT_CMD_SET_CONFIG`.\n - Check that the format is int16.\n - Check that the input and output channel masks are stereo.\n - If either check fails, return `-EINVAL`.\n - Legacy output (auxiliary) effects are configured by AudioFlinger with a mono input channel mask and potentially multichannel output channel masks, depending on whether the output sink is multichannel. They **must reject** unsupported configurations in `\n EFFECT_CMD_SET_CONFIG`.\n - Check that the format is int16.\n - Check that the input channel mask is mono and the output channel mask is stereo.\n - If either check fails, return `-EINVAL`.\n - Verify legacy code. Don't assume that it works!"]]