try {
MediaFormat format = MediaFormat.createAudioFormat("audio/mpeg", sampleRate, 1);
format.setInteger(MediaFormat.KEY_BIT_RATE, 128000);
format.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, 4096);
int sampleRate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE);
int channelCount = format.getInteger(MediaFormat.KEY_CHANNEL_COUNT);
decoder = MediaCodec.createDecoderByType("audio/mpeg");
decoder.configure(format, null, null, 0);
decoder.start();
} catch (IOException e) {
throw new RuntimeException(e);
}