CrackMe.apk
Download file
package com.google.android.exoplayer2.audio;
import com.google.android.exoplayer2.audio.AudioProcessor;
import com.google.android.exoplayer2.util.Util;
import com.google.common.base.Ascii;
import java.nio.ByteBuffer;
final class FloatResamplingAudioProcessor extends BaseAudioProcessor {
private static final int FLOAT_NAN_AS_INT = Float.floatToIntBits(Float.NaN);
private static final double PCM_32_BIT_INT_TO_PCM_32_BIT_FLOAT_FACTOR = 4.656612875245797E-10d;
FloatResamplingAudioProcessor() {
}
public AudioProcessor.AudioFormat onConfigure(AudioProcessor.AudioFormat audioFormat) throws AudioProcessor.UnhandledAudioFormatException {
int i = audioFormat.encoding;
if (!Util.isEncodingHighResolutionPcm(i)) {
throw new AudioProcessor.UnhandledAudioFormatException(audioFormat);
} else if (i != 4) {
return new AudioProcessor.AudioFormat(audioFormat.sampleRate, audioFormat.channelCount, 4);
} else {
return AudioProcessor.AudioFormat.NOT_SET;
}
}
public void queueInput(ByteBuffer byteBuffer) {
ByteBuffer byteBuffer2;
int position = byteBuffer.position();
int limit = byteBuffer.limit();
int i = limit - position;
int i2 = this.inputAudioFormat.encoding;
if (i2 == 536870912) {
byteBuffer2 = replaceOutputBuffer((i / 3) * 4);
while (position < limit) {
writePcm32BitFloat(((byteBuffer.get(position) & 255) << 8) | ((byteBuffer.get(position + 1) & 255) << Ascii.DLE) | ((byteBuffer.get(position + 2) & 255) << Ascii.CAN), byteBuffer2);
position += 3;
}
} else if (i2 == 805306368) {
byteBuffer2 = replaceOutputBuffer(i);
while (position < limit) {
writePcm32BitFloat((byteBuffer.get(position) & 255) | ((byteBuffer.get(position + 1) & 255) << 8) | ((byteBuffer.get(position + 2) & 255) << Ascii.DLE) | ((byteBuffer.get(position + 3) & 255) << Ascii.CAN), byteBuffer2);
position += 4;
}
} else {
throw new IllegalStateException();
}
byteBuffer.position(byteBuffer.limit());
byteBuffer2.flip();
}
private static void writePcm32BitFloat(int i, ByteBuffer byteBuffer) {
int floatToIntBits = Float.floatToIntBits((float) (((double) i) * PCM_32_BIT_INT_TO_PCM_32_BIT_FLOAT_FACTOR));
if (floatToIntBits == FLOAT_NAN_AS_INT) {
floatToIntBits = Float.floatToIntBits(0.0f);
}
byteBuffer.putInt(floatToIntBits);
}
}
Download file