package p138.p176.p177.p190.p192;

import com.google.android.exoplayer2.audio.AudioProcessor;
import java.nio.ByteBuffer;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ࢪ.ޑ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3493 extends AbstractC3489 {

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public static final int f10348 = Float.floatToIntBits(Float.NaN);

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m5780(int i, ByteBuffer byteBuffer) {
        int iFloatToIntBits = Float.floatToIntBits((float) (((double) i) * 4.656612875245797E-10d));
        if (iFloatToIntBits == f10348) {
            iFloatToIntBits = Float.floatToIntBits(0.0f);
        }
        byteBuffer.putInt(iFloatToIntBits);
    }

    @Override // com.google.android.exoplayer2.audio.AudioProcessor
    /* JADX INFO: renamed from: ֏ */
    public void mo1059(ByteBuffer byteBuffer) {
        ByteBuffer byteBufferM5775;
        int iPosition = byteBuffer.position();
        int iLimit = byteBuffer.limit();
        int i = iLimit - iPosition;
        int i2 = this.f10335.f1540;
        if (i2 == 536870912) {
            byteBufferM5775 = m5775((i / 3) * 4);
            while (iPosition < iLimit) {
                m5780(((byteBuffer.get(iPosition) & 255) << 8) | ((byteBuffer.get(iPosition + 1) & 255) << 16) | ((byteBuffer.get(iPosition + 2) & 255) << 24), byteBufferM5775);
                iPosition += 3;
            }
        } else {
            if (i2 != 805306368) {
                throw new IllegalStateException();
            }
            byteBufferM5775 = m5775(i);
            while (iPosition < iLimit) {
                m5780((byteBuffer.get(iPosition) & 255) | ((byteBuffer.get(iPosition + 1) & 255) << 8) | ((byteBuffer.get(iPosition + 2) & 255) << 16) | ((byteBuffer.get(iPosition + 3) & 255) << 24), byteBufferM5775);
                iPosition += 4;
            }
        }
        byteBuffer.position(byteBuffer.limit());
        byteBufferM5775.flip();
    }

    @Override // p138.p176.p177.p190.p192.AbstractC3489
    /* JADX INFO: renamed from: ؠ */
    public AudioProcessor.C0268 mo5776(AudioProcessor.C0268 c0268) throws AudioProcessor.UnhandledAudioFormatException {
        int i = c0268.f1540;
        if (C4150.m6801(i)) {
            return i != 4 ? new AudioProcessor.C0268(c0268.f1538, c0268.f1539, 4) : AudioProcessor.C0268.f1537;
        }
        throw new AudioProcessor.UnhandledAudioFormatException(c0268);
    }
}
