package q;

/* JADX INFO: renamed from: q.F, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2755F implements InterfaceC2753D {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f23161a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final InterfaceC2807y f23162b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final long f23163c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final long f23164d;

    public C2755F(int i6, int i7, InterfaceC2807y interfaceC2807y) {
        this.f23161a = i6;
        this.f23162b = interfaceC2807y;
        this.f23163c = ((long) i6) * 1000000;
        this.f23164d = ((long) i7) * 1000000;
    }

    @Override // q.InterfaceC2753D
    public final float b(long j4, float f6, float f7, float f8) {
        long j6 = j4 - this.f23164d;
        if (j6 < 0) {
            j6 = 0;
        }
        long j7 = this.f23163c;
        long j8 = j6 > j7 ? j7 : j6;
        if (j8 == 0) {
            return f8;
        }
        return (e(j8, f6, f7, f8) - e(j8 - 1000000, f6, f7, f8)) * 1000.0f;
    }

    @Override // q.InterfaceC2753D
    public final long c(float f6, float f7, float f8) {
        return this.f23164d + this.f23163c;
    }

    @Override // q.InterfaceC2753D
    public final float e(long j4, float f6, float f7, float f8) {
        long j6 = j4 - this.f23164d;
        if (j6 < 0) {
            j6 = 0;
        }
        long j7 = this.f23163c;
        if (j6 > j7) {
            j6 = j7;
        }
        float fA = this.f23162b.a(this.f23161a == 0 ? 1.0f : j6 / j7);
        return (f7 * fA) + ((1 - fA) * f6);
    }
}
