Files
rr3-apk/decompiled-community/sources/com/google/android/exoplayer2/util/TimedValueQueue.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

56 lines
1.3 KiB
Java

package com.google.android.exoplayer2.util;
/* loaded from: classes2.dex */
public final class TimedValueQueue {
public int first;
public int size;
public long[] timestamps;
public Object[] values;
public TimedValueQueue() {
this(10);
}
public TimedValueQueue(int i) {
this.timestamps = new long[i];
this.values = newArray(i);
}
public synchronized Object pollFloor(long j) {
return poll(j, true);
}
public synchronized Object poll(long j) {
return poll(j, false);
}
public final Object poll(long j, boolean z) {
Object obj = null;
long j2 = Long.MAX_VALUE;
while (this.size > 0) {
long j3 = j - this.timestamps[this.first];
if (j3 < 0 && (z || (-j3) >= j2)) {
break;
}
obj = popFirst();
j2 = j3;
}
return obj;
}
public final Object popFirst() {
Assertions.checkState(this.size > 0);
Object[] objArr = this.values;
int i = this.first;
Object obj = objArr[i];
objArr[i] = null;
this.first = (i + 1) % objArr.length;
this.size--;
return obj;
}
public static Object[] newArray(int i) {
return new Object[i];
}
}