This commit is contained in:
Lucwousin
2019-10-31 16:57:45 +01:00
parent 8b7eaf23f1
commit e7a1983158
344 changed files with 41280 additions and 41078 deletions

View File

@@ -1,206 +1,199 @@
import java.util.concurrent.ScheduledExecutorService;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("dv")
@ObfuscatedName("dq")
@Implements("PcmPlayer")
public class PcmPlayer {
@ObfuscatedName("p")
@Export("PcmPlayer_stereo")
public static boolean PcmPlayer_stereo;
@ObfuscatedName("m")
@Export("soundSystemExecutor")
static ScheduledExecutorService soundSystemExecutor;
@ObfuscatedName("o")
@ObfuscatedSignature(
signature = "Lcf;"
@ObfuscatedName("v")
@ObfuscatedGetter(
intValue = -326357542
)
@Export("pcmPlayerProvider")
static PcmPlayerProvider pcmPlayerProvider;
@ObfuscatedName("a")
@Export("PcmPlayer_sampleRate")
public static int PcmPlayer_sampleRate;
@ObfuscatedName("k")
@Export("samples")
protected int[] samples;
@ObfuscatedName("e")
@ObfuscatedName("x")
@ObfuscatedSignature(
signature = "Ldc;"
signature = "Ldj;"
)
@Export("stream")
PcmStream stream;
@ObfuscatedName("w")
@ObfuscatedName("j")
@ObfuscatedGetter(
intValue = 529397433
intValue = 1561038713
)
int field1388;
@ObfuscatedName("t")
int field1394;
@ObfuscatedName("r")
@ObfuscatedGetter(
longValue = -9085441602565192727L
longValue = -4392841547696202379L
)
@Export("timeMs")
long timeMs;
@ObfuscatedName("g")
@ObfuscatedName("e")
@ObfuscatedGetter(
intValue = 937182747
intValue = 1043621473
)
@Export("capacity")
int capacity;
@ObfuscatedName("x")
@ObfuscatedGetter(
intValue = -1375539879
)
int field1391;
@ObfuscatedName("h")
@ObfuscatedGetter(
intValue = -383494247
)
int field1392;
@ObfuscatedName("s")
@ObfuscatedGetter(
longValue = 2578589966919390689L
intValue = 87415669
)
long field1393;
int field1388;
@ObfuscatedName("b")
@ObfuscatedGetter(
intValue = 692811819
)
int field1389;
@ObfuscatedName("z")
@ObfuscatedGetter(
longValue = -5109190258343752079L
)
long field1390;
@ObfuscatedName("f")
@ObfuscatedGetter(
intValue = -709133773
intValue = -728002027
)
int field1383;
@ObfuscatedName("j")
int field1384;
@ObfuscatedName("g")
@ObfuscatedGetter(
intValue = 1808057975
intValue = 1330759581
)
int field1397;
@ObfuscatedName("d")
int field1380;
@ObfuscatedName("w")
@ObfuscatedGetter(
intValue = -236130375
intValue = -1355026859
)
int field1396;
@ObfuscatedName("l")
int field1393;
@ObfuscatedName("u")
@ObfuscatedGetter(
longValue = -2782522933298206297L
longValue = 8313708391947362675L
)
long field1382;
@ObfuscatedName("k")
boolean field1394;
@ObfuscatedName("ar")
long field1396;
@ObfuscatedName("y")
boolean field1395;
@ObfuscatedName("ag")
@ObfuscatedGetter(
intValue = 1371288149
intValue = 232307999
)
int field1399;
@ObfuscatedName("ab")
int field1392;
@ObfuscatedName("ak")
@ObfuscatedSignature(
signature = "[Ldc;"
signature = "[Ldj;"
)
PcmStream[] field1400;
@ObfuscatedName("ax")
PcmStream[] field1397;
@ObfuscatedName("av")
@ObfuscatedSignature(
signature = "[Ldc;"
signature = "[Ldj;"
)
PcmStream[] field1401;
PcmStream[] field1398;
protected PcmPlayer() {
this.field1388 = 32;
this.timeMs = class30.currentTimeMillis();
this.field1393 = 0L;
this.field1383 = 0;
this.field1397 = 0;
this.field1396 = 0;
this.field1382 = 0L;
this.field1394 = true;
this.field1399 = 0;
this.field1400 = new PcmStream[8];
this.field1401 = new PcmStream[8];
this.field1394 = 32;
this.timeMs = PlayerAppearance.currentTimeMillis();
this.field1390 = 0L;
this.field1384 = 0;
this.field1380 = 0;
this.field1393 = 0;
this.field1396 = 0L;
this.field1395 = true;
this.field1392 = 0;
this.field1397 = new PcmStream[8];
this.field1398 = new PcmStream[8];
}
@ObfuscatedName("z")
@ObfuscatedName("a")
@ObfuscatedSignature(
signature = "(B)V",
garbageValue = "8"
garbageValue = "-122"
)
@Export("init")
protected void init() throws Exception {
}
@ObfuscatedName("n")
@ObfuscatedName("t")
@ObfuscatedSignature(
signature = "(IS)V",
garbageValue = "2148"
signature = "(II)V",
garbageValue = "1329305761"
)
@Export("open")
protected void open(int var1) throws Exception {
}
@ObfuscatedName("v")
@ObfuscatedName("n")
@ObfuscatedSignature(
signature = "(B)I",
garbageValue = "1"
signature = "(I)I",
garbageValue = "-2053382901"
)
@Export("position")
protected int position() throws Exception {
return this.capacity;
}
@ObfuscatedName("u")
@ObfuscatedName("q")
@Export("write")
protected void write() throws Exception {
}
@ObfuscatedName("r")
@ObfuscatedName("v")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "90832052"
garbageValue = "-359946727"
)
@Export("close")
protected void close() {
}
@ObfuscatedName("p")
@ObfuscatedName("l")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "1875138754"
garbageValue = "47548316"
)
@Export("discard")
protected void discard() throws Exception {
}
@ObfuscatedName("ac")
@ObfuscatedName("av")
@ObfuscatedSignature(
signature = "(Ldc;I)V",
garbageValue = "1280132594"
signature = "(Ldj;S)V",
garbageValue = "2001"
)
@Export("setStream")
public final synchronized void setStream(PcmStream var1) {
this.stream = var1;
}
@ObfuscatedName("aa")
@ObfuscatedName("am")
@ObfuscatedSignature(
signature = "(B)V",
garbageValue = "17"
signature = "(I)V",
garbageValue = "-162724995"
)
@Export("run")
public final synchronized void run() {
if (this.samples != null) {
long var1 = class30.currentTimeMillis();
long var1 = PlayerAppearance.currentTimeMillis();
try {
if (this.field1393 != 0L) {
if (var1 < this.field1393) {
if (0L != this.field1390) {
if (var1 < this.field1390) {
return;
}
this.open(this.capacity);
this.field1393 = 0L;
this.field1394 = true;
this.field1390 = 0L;
this.field1395 = true;
}
int var3 = this.position();
if (this.field1396 - var3 > this.field1383) {
this.field1383 = this.field1396 - var3;
if (this.field1393 - var3 > this.field1384) {
this.field1384 = this.field1393 - var3;
}
int var4 = this.field1391 + this.field1392;
int var4 = this.field1389 + this.field1388;
if (var4 + 256 > 16384) {
var4 = 16128;
}
@@ -214,10 +207,10 @@ public class PcmPlayer {
this.close();
this.open(this.capacity);
var3 = 0;
this.field1394 = true;
this.field1395 = true;
if (var4 + 256 > this.capacity) {
var4 = this.capacity - 256;
this.field1392 = var4 - this.field1391;
this.field1389 = var4 - this.field1388;
}
}
@@ -227,28 +220,28 @@ public class PcmPlayer {
var3 += 256;
}
if (var1 > this.field1382) {
if (!this.field1394) {
if (this.field1383 == 0 && this.field1397 == 0) {
if (var1 > this.field1396) {
if (!this.field1395) {
if (this.field1384 == 0 && this.field1380 == 0) {
this.close();
this.field1393 = var1 + 2000L;
this.field1390 = var1 + 2000L;
return;
}
this.field1392 = Math.min(this.field1397, this.field1383);
this.field1397 = this.field1383;
this.field1389 = Math.min(this.field1380, this.field1384);
this.field1380 = this.field1384;
} else {
this.field1394 = false;
this.field1395 = false;
}
this.field1383 = 0;
this.field1382 = var1 + 2000L;
this.field1384 = 0;
this.field1396 = 2000L + var1;
}
this.field1396 = var3;
this.field1393 = var3;
} catch (Exception var7) {
this.close();
this.field1393 = var1 + 2000L;
this.field1390 = var1 + 2000L;
}
try {
@@ -256,9 +249,9 @@ public class PcmPlayer {
var1 = this.timeMs;
}
while (var1 > this.timeMs + 5000L) {
while (var1 > 5000L + this.timeMs) {
this.skip(256);
this.timeMs += (long)(256000 / UrlRequest.PcmPlayer_sampleRate);
this.timeMs += (long)(256000 / (PcmPlayer_sampleRate * 22050));
}
} catch (Exception var6) {
this.timeMs = var1;
@@ -267,57 +260,57 @@ public class PcmPlayer {
}
}
@ObfuscatedName("ap")
@ObfuscatedName("ab")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "580966872"
garbageValue = "-2122185925"
)
public final void method2397() {
this.field1394 = true;
public final void method2581() {
this.field1395 = true;
}
@ObfuscatedName("ar")
@ObfuscatedName("ax")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "-601426802"
garbageValue = "-855034369"
)
@Export("tryDiscard")
public final synchronized void tryDiscard() {
this.field1394 = true;
this.field1395 = true;
try {
this.discard();
} catch (Exception var2) {
this.close();
this.field1393 = class30.currentTimeMillis() + 2000L;
this.field1390 = PlayerAppearance.currentTimeMillis() + 2000L;
}
}
@ObfuscatedName("ab")
@ObfuscatedName("al")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "1026437845"
garbageValue = "-1045839525"
)
@Export("shutdown")
public final synchronized void shutdown() {
if (RunException.soundSystem != null) {
if (VerticalAlignment.soundSystem != null) {
boolean var1 = true;
for (int var2 = 0; var2 < 2; ++var2) {
if (this == RunException.soundSystem.players[var2]) {
RunException.soundSystem.players[var2] = null;
if (this == VerticalAlignment.soundSystem.players[var2]) {
VerticalAlignment.soundSystem.players[var2] = null;
}
if (RunException.soundSystem.players[var2] != null) {
if (VerticalAlignment.soundSystem.players[var2] != null) {
var1 = false;
}
}
if (var1) {
soundSystemExecutor.shutdownNow();
soundSystemExecutor = null;
RunException.soundSystem = null;
SecureRandomCallable.soundSystemExecutor.shutdownNow();
SecureRandomCallable.soundSystemExecutor = null;
VerticalAlignment.soundSystem = null;
}
}
@@ -325,16 +318,16 @@ public class PcmPlayer {
this.samples = null;
}
@ObfuscatedName("ax")
@ObfuscatedName("ap")
@ObfuscatedSignature(
signature = "(II)V",
garbageValue = "629535464"
garbageValue = "-1485075672"
)
@Export("skip")
final void skip(int var1) {
this.field1399 -= var1;
if (this.field1399 < 0) {
this.field1399 = 0;
this.field1392 -= var1;
if (this.field1392 < 0) {
this.field1392 = 0;
}
if (this.stream != null) {
@@ -343,20 +336,20 @@ public class PcmPlayer {
}
@ObfuscatedName("as")
@ObfuscatedName("aj")
@Export("fill")
final void fill(int[] var1, int var2) {
int var3 = var2;
if (PcmPlayer_stereo) {
if (InterfaceParent.PcmPlayer_stereo) {
var3 = var2 << 1;
}
class300.clearIntArray(var1, 0, var3);
this.field1399 -= var2;
if (this.stream != null && this.field1399 <= 0) {
this.field1399 += UrlRequest.PcmPlayer_sampleRate >> 4;
DynamicObject.PcmStream_disable(this.stream);
this.method2402(this.stream, this.stream.vmethod2691());
this.field1392 -= var2;
if (this.stream != null && this.field1392 <= 0) {
this.field1392 += PcmPlayer_sampleRate * 22050 >> 4;
PlayerAppearance.PcmStream_disable(this.stream);
this.method2586(this.stream, this.stream.vmethod2868());
int var4 = 0;
int var5 = 255;
@@ -378,7 +371,7 @@ public class PcmPlayer {
if ((var9 & 1) != 0) {
var5 &= ~(1 << var7);
var10 = null;
PcmStream var11 = this.field1400[var7];
PcmStream var11 = this.field1397[var7];
label98:
while (true) {
@@ -394,33 +387,33 @@ public class PcmPlayer {
var11 = var11.after;
} else {
var11.active = true;
int var13 = var11.vmethod3882();
int var13 = var11.vmethod4063();
var4 += var13;
if (var12 != null) {
var12.position += var13;
}
if (var4 >= this.field1388) {
if (var4 >= this.field1394) {
break label104;
}
PcmStream var14 = var11.firstSubStream();
if (var14 != null) {
for (int var15 = var11.field1462; var14 != null; var14 = var11.nextSubStream()) {
this.method2402(var14, var15 * var14.vmethod2691() >> 8);
for (int var15 = var11.field1467; var14 != null; var14 = var11.nextSubStream()) {
this.method2586(var14, var15 * var14.vmethod2868() >> 8);
}
}
PcmStream var18 = var11.after;
var11.after = null;
if (var10 == null) {
this.field1400[var7] = var18;
this.field1397[var7] = var18;
} else {
var10.after = var18;
}
if (var18 == null) {
this.field1401[var7] = var10;
this.field1398[var7] = var10;
}
var11 = var18;
@@ -435,9 +428,9 @@ public class PcmPlayer {
}
for (var6 = 0; var6 < 8; ++var6) {
PcmStream var16 = this.field1400[var6];
PcmStream[] var17 = this.field1400;
this.field1401[var6] = null;
PcmStream var16 = this.field1397[var6];
PcmStream[] var17 = this.field1397;
this.field1398[var6] = null;
for (var17[var6] = null; var16 != null; var16 = var10) {
var10 = var16.after;
@@ -446,32 +439,83 @@ public class PcmPlayer {
}
}
if (this.field1399 < 0) {
this.field1399 = 0;
if (this.field1392 < 0) {
this.field1392 = 0;
}
if (this.stream != null) {
this.stream.fill(var1, 0, var2);
}
this.timeMs = class30.currentTimeMillis();
this.timeMs = PlayerAppearance.currentTimeMillis();
}
@ObfuscatedName("al")
@ObfuscatedName("au")
@ObfuscatedSignature(
signature = "(Ldc;II)V",
garbageValue = "1373941757"
signature = "(Ldj;IB)V",
garbageValue = "113"
)
final void method2402(PcmStream var1, int var2) {
final void method2586(PcmStream var1, int var2) {
int var3 = var2 >> 5;
PcmStream var4 = this.field1401[var3];
PcmStream var4 = this.field1398[var3];
if (var4 == null) {
this.field1400[var3] = var1;
this.field1397[var3] = var1;
} else {
var4.after = var1;
}
this.field1401[var3] = var1;
var1.field1462 = var2;
this.field1398[var3] = var1;
var1.field1467 = var2;
}
@ObfuscatedName("t")
@ObfuscatedSignature(
signature = "(CI)Z",
garbageValue = "1251726708"
)
public static boolean method2639(char var0) {
if (var0 > ' ' && var0 < 127 || var0 > 127 && var0 < 160 || var0 > 160 && var0 <= 255) {
return true;
} else {
if (var0 != 0) {
char[] var1 = class287.cp1252AsciiExtension;
for (int var2 = 0; var2 < var1.length; ++var2) {
char var3 = var1[var2];
if (var0 == var3) {
return true;
}
}
}
return false;
}
}
@ObfuscatedName("v")
@ObfuscatedSignature(
signature = "(III)I",
garbageValue = "1581886582"
)
static int method2638(int var0, int var1) {
long var2 = (long)((var0 << 16) + var1);
return UserComparator6.NetCache_currentResponse != null && var2 == UserComparator6.NetCache_currentResponse.key ? Frames.NetCache_responseArchiveBuffer.offset * 99 / (Frames.NetCache_responseArchiveBuffer.array.length - UserComparator6.NetCache_currentResponse.padding) + 1 : 0;
}
@ObfuscatedName("hk")
@ObfuscatedSignature(
signature = "(IIB)I",
garbageValue = "-14"
)
static int method2637(int var0, int var1) {
int var2 = var1 - 334;
if (var2 < 0) {
var2 = 0;
} else if (var2 > 100) {
var2 = 100;
}
int var3 = (Client.zoomWidth - Client.zoomHeight) * var2 / 100 + Client.zoomHeight;
return var0 * var3 / 256;
}
}