70 lines
1.6 KiB
Java
70 lines
1.6 KiB
Java
package c.i.a.c.v1;
|
|
|
|
import android.media.AudioTimestamp;
|
|
import android.media.AudioTrack;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RequiresApi;
|
|
import c.i.a.c.i2.f0;
|
|
/* compiled from: AudioTimestampPoller */
|
|
public final class r {
|
|
@Nullable
|
|
public final a a;
|
|
public int b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public long f996c;
|
|
public long d;
|
|
public long e;
|
|
public long f;
|
|
|
|
/* compiled from: AudioTimestampPoller */
|
|
@RequiresApi(19)
|
|
public static final class a {
|
|
public final AudioTrack a;
|
|
public final AudioTimestamp b = new AudioTimestamp();
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public long f997c;
|
|
public long d;
|
|
public long e;
|
|
|
|
public a(AudioTrack audioTrack) {
|
|
this.a = audioTrack;
|
|
}
|
|
}
|
|
|
|
public r(AudioTrack audioTrack) {
|
|
if (f0.a >= 19) {
|
|
this.a = new a(audioTrack);
|
|
a();
|
|
return;
|
|
}
|
|
this.a = null;
|
|
b(3);
|
|
}
|
|
|
|
public void a() {
|
|
if (this.a != null) {
|
|
b(0);
|
|
}
|
|
}
|
|
|
|
public final void b(int i) {
|
|
this.b = i;
|
|
if (i == 0) {
|
|
this.e = 0;
|
|
this.f = -1;
|
|
this.f996c = System.nanoTime() / 1000;
|
|
this.d = 10000;
|
|
} else if (i == 1) {
|
|
this.d = 10000;
|
|
} else if (i == 2 || i == 3) {
|
|
this.d = 10000000;
|
|
} else if (i == 4) {
|
|
this.d = 500000;
|
|
} else {
|
|
throw new IllegalStateException();
|
|
}
|
|
}
|
|
}
|