mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

`asReadOnlyBuffer` doesn't copy the original byte order but always sets it to big-endian. Replace calls to it with a utility method that manually sets the byte order after creating the read-only copy. This fixes `TeeAudioProcessor` providing a `ByteBuffer` always in big-endian and hence causing `AudioBufferSink` to read wrong data. PiperOrigin-RevId: 554861402