package defpackage;

import java.util.Locale;

/* renamed from: ᵠᵿʾ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C3163 implements InterfaceC1593 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public long f12002;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public int f12003;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public long f12004;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final int f12005;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final C2419 f12006;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final boolean f12007;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public InterfaceC2154 f12008;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public static final int[] f12001 = {13, 14, 16, 18, 20, 21, 27, 32, 6, 7, 6, 6, 1, 1, 1, 1};

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public static final int[] f12000 = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 1, 1, 1, 1, 1, 1};

    public C3163(C2419 c2419) {
        this.f12006 = c2419;
        String str = c2419.f9445.f12929;
        str.getClass();
        this.f12007 = "audio/amr-wb".equals(str);
        this.f12005 = c2419.f9447;
        this.f12002 = -9223372036854775807L;
        this.f12003 = -1;
        this.f12004 = 0L;
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ˏᵙ */
    public final void mo2630(InterfaceC1982 interfaceC1982, int i) {
        InterfaceC2154 interfaceC2154Mo4996 = interfaceC1982.mo4996(i, 1);
        this.f12008 = interfaceC2154Mo4996;
        interfaceC2154Mo4996.mo4407(this.f12006.f9445);
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ᵥᵯˎ */
    public final void mo2631(long j) {
        this.f12002 = j;
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ᵴᵳ */
    public final void mo2632(long j, long j2) {
        this.f12002 = j;
        this.f12004 = j2;
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo2633(C3493 c3493, long j, int i, boolean z) {
        int iM10873;
        this.f12008.getClass();
        int i2 = this.f12003;
        if (i2 != -1 && i != (iM10873 = C5228.m10873(i2))) {
            String str = AbstractC3558.f13329;
            Locale locale = Locale.US;
            ᵳʿˉ.ᵶʔᵢˊ("Received RTP packet with unexpected sequence number. Expected: " + iM10873 + "; received: " + i + ".");
        }
        c3493.m7946(1);
        int iM7968 = (c3493.m7968() >> 3) & 15;
        boolean z2 = (iM7968 >= 0 && iM7968 <= 8) || iM7968 == 15;
        boolean z3 = this.f12007;
        String str2 = z3 ? "WB" : "NB";
        if (!z2) {
            ᵹˉᵞ.ˌᵜᵹᵩ(ˊˉʤﹳ.ˁˑᵰ("Illegal AMR %s frame type %s", new Object[]{str2, Integer.valueOf(iM7968)}));
            return;
        }
        int i3 = z3 ? f12000[iM7968] : f12001[iM7968];
        int iM7959 = c3493.m7959();
        ᵛᵾˏ.ˌᵜᵹᵩ("compound payload not supported currently", iM7959 == i3);
        this.f12008.mo4406(iM7959, c3493);
        this.f12008.mo4410(ˁˈᵸ.ᵡᵘˎʽ(this.f12005, this.f12004, j, this.f12002), 1, iM7959, 0, null);
        this.f12003 = i;
    }
}
