From 6377f9130df89127da606474baa250d9bdb3f617 Mon Sep 17 00:00:00 2001 From: Marc Baechinger Date: Tue, 14 Jun 2022 17:10:08 +0000 Subject: [PATCH] Merge pull request #10322 from DolbyLaboratories:dev-v2-multichannel PiperOrigin-RevId: 454641746 (cherry picked from commit 970eb4444c54f7bf899e429d845cf978b97dced7) --- RELEASENOTES.md | 4 ++++ .../src/main/java/androidx/media3/common/util/Util.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 2dc28a2bb0..76ce7b051e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -69,6 +69,10 @@ for audio passthrough when the format audio channel count is unset, which occurs with HLS chunkless preparation ([10204](https://github.com/google/ExoPlayer/issues/10204)). + * Configure `AudioTrack` with channel mask + `AudioFormat.CHANNEL_OUT_7POINT1POINT4` if the decoder outputs 12 + channel PCM audio + ([#10322](#https://github.com/google/ExoPlayer/pull/10322). * DRM * Ensure the DRM session is always correctly updated when seeking immediately after a format change diff --git a/libraries/common/src/main/java/androidx/media3/common/util/Util.java b/libraries/common/src/main/java/androidx/media3/common/util/Util.java index f80525bdf6..7238fad0fe 100644 --- a/libraries/common/src/main/java/androidx/media3/common/util/Util.java +++ b/libraries/common/src/main/java/androidx/media3/common/util/Util.java @@ -1723,6 +1723,10 @@ public final class Util { // 8 ch output is not supported before Android L. return AudioFormat.CHANNEL_INVALID; } + case 12: + return Util.SDK_INT >= 32 + ? AudioFormat.CHANNEL_OUT_7POINT1POINT4 + : AudioFormat.CHANNEL_INVALID; default: return AudioFormat.CHANNEL_INVALID; }