project: Rev 202
This commit is contained in:
@@ -29,7 +29,7 @@ public class DevicePcmPlayer extends PcmPlayer {
|
||||
byte[] byteSamples;
|
||||
|
||||
DevicePcmPlayer() {
|
||||
} // L: 18
|
||||
}
|
||||
|
||||
@ObfuscatedName("c")
|
||||
@ObfuscatedSignature(
|
||||
@@ -38,9 +38,9 @@ public class DevicePcmPlayer extends PcmPlayer {
|
||||
)
|
||||
@Export("init")
|
||||
protected void init() {
|
||||
this.format = new AudioFormat((float)class339.field4058, 16, SpriteMask.PcmPlayer_stereo ? 2 : 1, true, false); // L: 22
|
||||
this.byteSamples = new byte[256 << (SpriteMask.PcmPlayer_stereo ? 2 : 1)]; // L: 23
|
||||
} // L: 24
|
||||
this.format = new AudioFormat((float)class339.field4058, 16, SpriteMask.PcmPlayer_stereo ? 2 : 1, true, false);
|
||||
this.byteSamples = new byte[256 << (SpriteMask.PcmPlayer_stereo ? 2 : 1)];
|
||||
}
|
||||
|
||||
@ObfuscatedName("b")
|
||||
@ObfuscatedSignature(
|
||||
@@ -50,20 +50,20 @@ public class DevicePcmPlayer extends PcmPlayer {
|
||||
@Export("open")
|
||||
protected void open(int var1) throws LineUnavailableException {
|
||||
try {
|
||||
Info var2 = new Info(SourceDataLine.class, this.format, var1 << (SpriteMask.PcmPlayer_stereo ? 2 : 1)); // L: 29
|
||||
this.line = (SourceDataLine)AudioSystem.getLine(var2); // L: 30
|
||||
this.line.open(); // L: 31
|
||||
this.line.start(); // L: 32
|
||||
this.capacity2 = var1; // L: 33
|
||||
} catch (LineUnavailableException var3) { // L: 35
|
||||
if (Language.method5825(var1) != 1) { // L: 36
|
||||
this.open(SpotAnimationDefinition.method3362(var1)); // L: 37
|
||||
Info var2 = new Info(SourceDataLine.class, this.format, var1 << (SpriteMask.PcmPlayer_stereo ? 2 : 1));
|
||||
this.line = (SourceDataLine)AudioSystem.getLine(var2);
|
||||
this.line.open();
|
||||
this.line.start();
|
||||
this.capacity2 = var1;
|
||||
} catch (LineUnavailableException var3) {
|
||||
if (Language.method5825(var1) != 1) {
|
||||
this.open(SpotAnimationDefinition.method3362(var1));
|
||||
} else {
|
||||
this.line = null; // L: 40
|
||||
throw var3; // L: 41
|
||||
this.line = null;
|
||||
throw var3;
|
||||
}
|
||||
}
|
||||
} // L: 38 43
|
||||
}
|
||||
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedSignature(
|
||||
@@ -72,29 +72,29 @@ public class DevicePcmPlayer extends PcmPlayer {
|
||||
)
|
||||
@Export("position")
|
||||
protected int position() {
|
||||
return this.capacity2 - (this.line.available() >> (SpriteMask.PcmPlayer_stereo ? 2 : 1)); // L: 47
|
||||
return this.capacity2 - (this.line.available() >> (SpriteMask.PcmPlayer_stereo ? 2 : 1));
|
||||
}
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@Export("write")
|
||||
protected void write() {
|
||||
int var1 = 256; // L: 53
|
||||
if (SpriteMask.PcmPlayer_stereo) { // L: 54
|
||||
int var1 = 256;
|
||||
if (SpriteMask.PcmPlayer_stereo) {
|
||||
var1 <<= 1;
|
||||
}
|
||||
|
||||
for (int var2 = 0; var2 < var1; ++var2) { // L: 55
|
||||
int var3 = super.samples[var2]; // L: 56
|
||||
if ((var3 + 8388608 & -16777216) != 0) { // L: 57
|
||||
var3 = 8388607 ^ var3 >> 31; // L: 58
|
||||
for (int var2 = 0; var2 < var1; ++var2) {
|
||||
int var3 = super.samples[var2];
|
||||
if ((var3 + 8388608 & -16777216) != 0) {
|
||||
var3 = 8388607 ^ var3 >> 31;
|
||||
}
|
||||
|
||||
this.byteSamples[var2 * 2] = (byte)(var3 >> 8); // L: 60
|
||||
this.byteSamples[var2 * 2 + 1] = (byte)(var3 >> 16); // L: 61
|
||||
this.byteSamples[var2 * 2] = (byte)(var3 >> 8);
|
||||
this.byteSamples[var2 * 2 + 1] = (byte)(var3 >> 16);
|
||||
}
|
||||
|
||||
this.line.write(this.byteSamples, 0, var1 << 1); // L: 63
|
||||
} // L: 64
|
||||
this.line.write(this.byteSamples, 0, var1 << 1);
|
||||
}
|
||||
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedSignature(
|
||||
@@ -103,12 +103,12 @@ public class DevicePcmPlayer extends PcmPlayer {
|
||||
)
|
||||
@Export("close")
|
||||
protected void close() {
|
||||
if (this.line != null) { // L: 68
|
||||
this.line.close(); // L: 69
|
||||
this.line = null; // L: 70
|
||||
if (this.line != null) {
|
||||
this.line.close();
|
||||
this.line = null;
|
||||
}
|
||||
|
||||
} // L: 72
|
||||
}
|
||||
|
||||
@ObfuscatedName("s")
|
||||
@ObfuscatedSignature(
|
||||
@@ -117,6 +117,6 @@ public class DevicePcmPlayer extends PcmPlayer {
|
||||
)
|
||||
@Export("discard")
|
||||
protected void discard() {
|
||||
this.line.flush(); // L: 76
|
||||
} // L: 77
|
||||
this.line.flush();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user