private boolean checkIfReinitializationRequired(MediaFormat newFormat) {
        return mAudioFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT) != newFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT)
                || mAudioFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE) != newFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE)
                || !mAudioFormat.getString(MediaFormat.KEY_MIME).equals(newFormat.getString(MediaFormat.KEY_MIME));
    }
Initializes or reinitializes the audio track with the supplied format for playback
while keeping the playstate. Keeps the current configuration and skips reinitialization
if the new format is the same as the current format.
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/AudioPlayback.java