package p138.p176.p177.p190.p192;

import com.google.android.exoplayer2.audio.AudioProcessor;
import java.nio.ByteBuffer;
import p000.p001.p002.p003.p004.C0567;

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

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public int[] f10342;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public int[] f10343;

    @Override // com.google.android.exoplayer2.audio.AudioProcessor
    /* JADX INFO: renamed from: ֏ */
    public void mo1059(ByteBuffer byteBuffer) {
        int[] iArr = this.f10343;
        C0567.m1856(iArr);
        int[] iArr2 = iArr;
        int iPosition = byteBuffer.position();
        int iLimit = byteBuffer.limit();
        ByteBuffer byteBufferM5775 = m5775(((iLimit - iPosition) / this.f10335.f1541) * this.f10336.f1541);
        while (iPosition < iLimit) {
            for (int i : iArr2) {
                byteBufferM5775.putShort(byteBuffer.getShort((i * 2) + iPosition));
            }
            iPosition += this.f10335.f1541;
        }
        byteBuffer.position(iLimit);
        byteBufferM5775.flip();
    }

    @Override // p138.p176.p177.p190.p192.AbstractC3489
    /* JADX INFO: renamed from: ؠ */
    public AudioProcessor.C0268 mo5776(AudioProcessor.C0268 c0268) throws AudioProcessor.UnhandledAudioFormatException {
        int[] iArr = this.f10342;
        if (iArr == null) {
            return AudioProcessor.C0268.f1537;
        }
        if (c0268.f1540 != 2) {
            throw new AudioProcessor.UnhandledAudioFormatException(c0268);
        }
        boolean z = c0268.f1539 != iArr.length;
        int i = 0;
        while (i < iArr.length) {
            int i2 = iArr[i];
            if (i2 >= c0268.f1539) {
                throw new AudioProcessor.UnhandledAudioFormatException(c0268);
            }
            z |= i2 != i;
            i++;
        }
        return z ? new AudioProcessor.C0268(c0268.f1538, iArr.length, 2) : AudioProcessor.C0268.f1537;
    }

    @Override // p138.p176.p177.p190.p192.AbstractC3489
    /* JADX INFO: renamed from: ރ */
    public void mo5777() {
        this.f10343 = this.f10342;
    }

    @Override // p138.p176.p177.p190.p192.AbstractC3489
    /* JADX INFO: renamed from: ޅ */
    public void mo5779() {
        this.f10343 = null;
        this.f10342 = null;
    }
}
