Android audio too fast on some devices with MediaCodec and AudioTrack
问题 I am decoding audio using MediaExtractor , MediaCodec , and AudioTrack . I am configuring the AudioTrack using the MediaFormat returned by MediaCodec.getOutputFormat() after receiving MediaCodec.INFO_OUTPUT_FORMAT_CHANGED from the MediaCodec . On some devices, this results in speeded up audio, while the MediaFormat returned by the MediaExtractor works correctly. (On other devices, the reverse is true.) Here are some details: The audio files in question are largely 22050 Hz mono MP3s. The