package defpackage;

import androidx.media3.common.ParserException;
import java.math.RoundingMode;

/* JADX INFO: renamed from: ːʤﹶᵷ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1943 implements InterfaceC3802 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public long f7730;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public Object f7731;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public int f7732;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public Object f7733;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public int f7734;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public Object f7735;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public long f7736;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public Object f7737;

    public C1943(InterfaceC4550 interfaceC4550, InterfaceC5226 interfaceC5226, C1597 c1597, String str, int i) throws ParserException {
        this.f7733 = interfaceC4550;
        this.f7737 = interfaceC5226;
        this.f7735 = c1597;
        int i2 = c1597.f6411;
        int i3 = c1597.f6408;
        int i4 = (c1597.f6412 * i2) / 8;
        int i5 = c1597.f6409;
        if (i5 != i4) {
            throw ParserException.m357("Expected block size: " + i4 + "; got: " + i5, null);
        }
        int i6 = i3 * i4;
        int i7 = i6 * 8;
        int iMax = Math.max(i4, i6 / 10);
        this.f7734 = iMax;
        C4753 c4753 = new C4753();
        c4753.f18111 = AbstractC4208.m9132("audio/wav");
        c4753.f18101 = AbstractC4208.m9132(str);
        c4753.f18099 = i7;
        c4753.f18128 = i7;
        c4753.f18116 = iMax;
        c4753.f18090 = i2;
        c4753.f18113 = i3;
        c4753.f18095 = i;
        this.f7731 = new C5286(c4753);
    }

    @Override // defpackage.InterfaceC3802
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public boolean mo5204(InterfaceC5206 interfaceC5206, long j) {
        int i;
        int i2;
        long j2 = j;
        while (j2 > 0 && (i = this.f7732) < (i2 = this.f7734)) {
            int iMo1744 = ((InterfaceC5226) this.f7737).mo1744(interfaceC5206, (int) Math.min(i2 - i, j2), true);
            if (iMo1744 == -1) {
                j2 = 0;
            } else {
                this.f7732 += iMo1744;
                j2 -= (long) iMo1744;
            }
        }
        C1597 c1597 = (C1597) this.f7735;
        int i3 = c1597.f6409;
        int i4 = this.f7732 / i3;
        if (i4 > 0) {
            long j3 = this.f7730;
            long j4 = this.f7736;
            long j5 = c1597.f6408;
            String str = AbstractC0956.f4222;
            long jM3218 = j3 + AbstractC0956.m3218(j4, 1000000L, j5, RoundingMode.DOWN);
            int i5 = i4 * i3;
            int i6 = this.f7732 - i5;
            ((InterfaceC5226) this.f7737).mo1741(jM3218, 1, i5, i6, null);
            this.f7736 += (long) i4;
            this.f7732 = i6;
        }
        return j2 <= 0;
    }

    @Override // defpackage.InterfaceC3802
    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public void mo5205(long j, int i) {
        C1977 c1977 = new C1977((C1597) this.f7735, 1, i, j);
        ((InterfaceC4550) this.f7733).mo2739(c1977);
        InterfaceC5226 interfaceC5226 = (InterfaceC5226) this.f7737;
        interfaceC5226.mo1742((C5286) this.f7731);
        interfaceC5226.mo1743(c1977.f7844);
    }

    @Override // defpackage.InterfaceC3802
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public void mo5206(long j) {
        this.f7730 = j;
        this.f7732 = 0;
        this.f7736 = 0L;
    }
}
