479 lines
8.4 KiB
Smali
479 lines
8.4 KiB
Smali
.class public final Lf/k/a/b/z0/t$c;
|
|
.super Ljava/lang/Object;
|
|
.source "DefaultAudioSink.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lf/k/a/b/z0/t;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "c"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Z
|
|
|
|
.field public final b:I
|
|
|
|
.field public final c:I
|
|
|
|
.field public final d:I
|
|
|
|
.field public final e:I
|
|
|
|
.field public final f:I
|
|
|
|
.field public final g:I
|
|
|
|
.field public final h:I
|
|
|
|
.field public final i:Z
|
|
|
|
.field public final j:Z
|
|
|
|
.field public final k:[Lf/k/a/b/z0/l;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(ZIIIIIIIZZ[Lf/k/a/b/z0/l;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-boolean p1, p0, Lf/k/a/b/z0/t$c;->a:Z
|
|
|
|
iput p2, p0, Lf/k/a/b/z0/t$c;->b:I
|
|
|
|
iput p3, p0, Lf/k/a/b/z0/t$c;->c:I
|
|
|
|
iput p4, p0, Lf/k/a/b/z0/t$c;->d:I
|
|
|
|
iput p5, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
iput p6, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
iput p7, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
if-eqz p8, :cond_0
|
|
|
|
goto/16 :goto_4
|
|
|
|
:cond_0
|
|
iget-boolean p1, p0, Lf/k/a/b/z0/t$c;->a:Z
|
|
|
|
const-wide/32 p2, 0x3d090
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget p1, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
iget p4, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
iget p5, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
invoke-static {p1, p4, p5}, Landroid/media/AudioTrack;->getMinBufferSize(III)I
|
|
|
|
move-result p1
|
|
|
|
const/4 p4, -0x2
|
|
|
|
if-eq p1, p4, :cond_1
|
|
|
|
const/4 p4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p4, 0x0
|
|
|
|
:goto_0
|
|
invoke-static {p4}, Lf/k/a/b/l1/e;->d(Z)V
|
|
|
|
mul-int/lit8 p4, p1, 0x4
|
|
|
|
invoke-virtual {p0, p2, p3}, Lf/k/a/b/z0/t$c;->a(J)J
|
|
|
|
move-result-wide p2
|
|
|
|
long-to-int p3, p2
|
|
|
|
iget p2, p0, Lf/k/a/b/z0/t$c;->d:I
|
|
|
|
mul-int p3, p3, p2
|
|
|
|
int-to-long p1, p1
|
|
|
|
const-wide/32 p5, 0xb71b0
|
|
|
|
invoke-virtual {p0, p5, p6}, Lf/k/a/b/z0/t$c;->a(J)J
|
|
|
|
move-result-wide p5
|
|
|
|
iget p7, p0, Lf/k/a/b/z0/t$c;->d:I
|
|
|
|
int-to-long p7, p7
|
|
|
|
mul-long p5, p5, p7
|
|
|
|
invoke-static {p1, p2, p5, p6}, Ljava/lang/Math;->max(JJ)J
|
|
|
|
move-result-wide p1
|
|
|
|
long-to-int p2, p1
|
|
|
|
invoke-static {p4, p3, p2}, Lf/k/a/b/l1/f0;->a(III)I
|
|
|
|
move-result p1
|
|
|
|
:goto_1
|
|
move p8, p1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_2
|
|
iget p1, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
const/4 p4, 0x5
|
|
|
|
if-eq p1, p4, :cond_9
|
|
|
|
const/4 p5, 0x6
|
|
|
|
if-eq p1, p5, :cond_8
|
|
|
|
const/4 p5, 0x7
|
|
|
|
if-eq p1, p5, :cond_7
|
|
|
|
const/16 p5, 0x8
|
|
|
|
if-eq p1, p5, :cond_6
|
|
|
|
const/16 p5, 0xe
|
|
|
|
if-eq p1, p5, :cond_5
|
|
|
|
const/16 p5, 0x11
|
|
|
|
if-eq p1, p5, :cond_4
|
|
|
|
const/16 p5, 0x12
|
|
|
|
if-ne p1, p5, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_4
|
|
const p1, 0x52080
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
const p1, 0x2ebae4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
const p1, 0x225510
|
|
|
|
goto :goto_3
|
|
|
|
:cond_7
|
|
const p1, 0x2ee00
|
|
|
|
goto :goto_3
|
|
|
|
:cond_8
|
|
:goto_2
|
|
const p1, 0xbb800
|
|
|
|
goto :goto_3
|
|
|
|
:cond_9
|
|
const p1, 0x13880
|
|
|
|
:goto_3
|
|
iget p5, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
if-ne p5, p4, :cond_a
|
|
|
|
mul-int/lit8 p1, p1, 0x2
|
|
|
|
:cond_a
|
|
int-to-long p4, p1
|
|
|
|
mul-long p4, p4, p2
|
|
|
|
const-wide/32 p1, 0xf4240
|
|
|
|
div-long/2addr p4, p1
|
|
|
|
long-to-int p1, p4
|
|
|
|
goto :goto_1
|
|
|
|
:goto_4
|
|
iput p8, p0, Lf/k/a/b/z0/t$c;->h:I
|
|
|
|
iput-boolean p9, p0, Lf/k/a/b/z0/t$c;->i:Z
|
|
|
|
iput-boolean p10, p0, Lf/k/a/b/z0/t$c;->j:Z
|
|
|
|
iput-object p11, p0, Lf/k/a/b/z0/t$c;->k:[Lf/k/a/b/z0/l;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(J)J
|
|
.locals 2
|
|
|
|
iget v0, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
int-to-long v0, v0
|
|
|
|
mul-long p1, p1, v0
|
|
|
|
const-wide/32 v0, 0xf4240
|
|
|
|
div-long/2addr p1, v0
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public a(ZLf/k/a/b/z0/i;I)Landroid/media/AudioTrack;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lf/k/a/b/z0/n$b;
|
|
}
|
|
.end annotation
|
|
|
|
sget v0, Lf/k/a/b/l1/f0;->a:I
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/16 v2, 0x15
|
|
|
|
if-lt v0, v2, :cond_2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance p1, Landroid/media/AudioAttributes$Builder;
|
|
|
|
invoke-direct {p1}, Landroid/media/AudioAttributes$Builder;-><init>()V
|
|
|
|
const/4 p2, 0x3
|
|
|
|
invoke-virtual {p1, p2}, Landroid/media/AudioAttributes$Builder;->setContentType(I)Landroid/media/AudioAttributes$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 p2, 0x10
|
|
|
|
invoke-virtual {p1, p2}, Landroid/media/AudioAttributes$Builder;->setFlags(I)Landroid/media/AudioAttributes$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/media/AudioAttributes$Builder;->setUsage(I)Landroid/media/AudioAttributes$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/media/AudioAttributes$Builder;->build()Landroid/media/AudioAttributes;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p2}, Lf/k/a/b/z0/i;->a()Landroid/media/AudioAttributes;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
move-object v3, p1
|
|
|
|
new-instance p1, Landroid/media/AudioFormat$Builder;
|
|
|
|
invoke-direct {p1}, Landroid/media/AudioFormat$Builder;-><init>()V
|
|
|
|
iget p2, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/media/AudioFormat$Builder;->setChannelMask(I)Landroid/media/AudioFormat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
iget p2, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/media/AudioFormat$Builder;->setEncoding(I)Landroid/media/AudioFormat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
iget p2, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/media/AudioFormat$Builder;->setSampleRate(I)Landroid/media/AudioFormat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/media/AudioFormat$Builder;->build()Landroid/media/AudioFormat;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance p1, Landroid/media/AudioTrack;
|
|
|
|
iget v5, p0, Lf/k/a/b/z0/t$c;->h:I
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
move v7, p3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p3, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
:goto_1
|
|
move-object v2, p1
|
|
|
|
invoke-direct/range {v2 .. v7}, Landroid/media/AudioTrack;-><init>(Landroid/media/AudioAttributes;Landroid/media/AudioFormat;III)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
iget p1, p2, Lf/k/a/b/z0/i;->c:I
|
|
|
|
invoke-static {p1}, Lf/k/a/b/l1/f0;->b(I)I
|
|
|
|
move-result v3
|
|
|
|
if-nez p3, :cond_3
|
|
|
|
new-instance p1, Landroid/media/AudioTrack;
|
|
|
|
iget v4, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
iget v5, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
iget v6, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
iget v7, p0, Lf/k/a/b/z0/t$c;->h:I
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-direct/range {v2 .. v8}, Landroid/media/AudioTrack;-><init>(IIIIII)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
new-instance p1, Landroid/media/AudioTrack;
|
|
|
|
iget v4, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
iget v5, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
iget v6, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
iget v7, p0, Lf/k/a/b/z0/t$c;->h:I
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v2, p1
|
|
|
|
move v9, p3
|
|
|
|
invoke-direct/range {v2 .. v9}, Landroid/media/AudioTrack;-><init>(IIIIIII)V
|
|
|
|
:goto_2
|
|
invoke-virtual {p1}, Landroid/media/AudioTrack;->getState()I
|
|
|
|
move-result p2
|
|
|
|
if-ne p2, v1, :cond_4
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
:try_start_0
|
|
invoke-virtual {p1}, Landroid/media/AudioTrack;->release()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
new-instance p1, Lf/k/a/b/z0/n$b;
|
|
|
|
iget p3, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
iget v0, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
iget v1, p0, Lf/k/a/b/z0/t$c;->h:I
|
|
|
|
invoke-direct {p1, p2, p3, v0, v1}, Lf/k/a/b/z0/n$b;-><init>(IIII)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public a(Lf/k/a/b/z0/t$c;)Z
|
|
.locals 2
|
|
|
|
iget v0, p1, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
iget v1, p0, Lf/k/a/b/z0/t$c;->g:I
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
iget v0, p1, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
iget v1, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
iget p1, p1, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
iget v0, p0, Lf/k/a/b/z0/t$c;->f:I
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public b(J)J
|
|
.locals 2
|
|
|
|
const-wide/32 v0, 0xf4240
|
|
|
|
mul-long p1, p1, v0
|
|
|
|
iget v0, p0, Lf/k/a/b/z0/t$c;->e:I
|
|
|
|
int-to-long v0, v0
|
|
|
|
div-long/2addr p1, v0
|
|
|
|
return-wide p1
|
|
.end method
|