mirror of
https://github.com/androidx/media.git
synced 2025-05-04 06:00:37 +08:00

Both the extension OPUS decoder and the OMX/C2 MediaCodec implementations for OPUS and VORBIS decode into the channel layout defined by VORBIS. See https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-140001.2.3 While this is technically correct for a stand-alone OPUS or VORBIS decoder, it doesn't match the channel layout expected by Android. See https://developer.android.com/reference/android/media/AudioFormat#channelMask The fix is to apply the channel mapping after decoding if needed. Also add e2e tests with audio dumps for the extension renderer, including a new 5.1 channel test file. Issue: google/ExoPlayer#8396 PiperOrigin-RevId: 588004832 (cherry picked from commit b1541b096f9dc4d1f9ca71b6743c836f6bd4de89)