|
import java.applet.Applet; |
|
import java.awt.Graphics; |
|
import java.awt.event.MouseEvent; |
|
import java.awt.event.MouseListener; |
|
import java.io.IOException; |
|
import java.io.InputStream; |
|
import java.io.OutputStream; |
|
import java.net.Socket; |
|
import javax.sound.sampled.AudioFormat; |
|
import javax.sound.sampled.AudioSystem; |
|
import javax.sound.sampled.DataLine; |
|
import javax.sound.sampled.LineEvent; |
|
import javax.sound.sampled.LineListener; |
|
import javax.sound.sampled.LineUnavailableException; |
|
import javax.sound.sampled.SourceDataLine; |
|
import netscape.javascript.JSObject; |
|
|
|
public class websdrsound extends Applet implements LineListener, Runnable, MouseListener { |
|
private SourceDataLine I; |
|
|
|
private Socket I1; |
|
|
|
private InputStream II; |
|
|
|
OutputStream Il; |
|
|
|
static final long serialVersionUID = 1L; |
|
|
|
int I11 = -2; |
|
|
|
int II1 = -2; |
|
|
|
int Il1 = -1; |
|
|
|
int I1I = 0; |
|
|
|
int III = 0; |
|
|
|
final float IlI = 200.0F; |
|
|
|
int I1l = 0; |
|
|
|
String IIl = ""; |
|
|
|
int Ill = -1; |
|
|
|
Thread I111; |
|
|
|
boolean II11 = true; |
|
|
|
boolean Il11 = false; |
|
|
|
public int smeter = -32767; |
|
|
|
public int l = 0; |
|
|
|
public int I1I1 = this.l; |
|
|
|
double III1 = 1.0D; |
|
|
|
float IlI1 = 1.0F; |
|
|
|
double I1l1 = 0.0D; |
|
|
|
double IIl1 = 0.0D; |
|
|
|
final int Ill1 = 23; |
|
|
|
final int I11I = 128; |
|
|
|
final int II1I = 48; |
|
|
|
float Il1I = 1.0F; |
|
|
|
final float[] lll1l1l = new float[3]; |
|
|
|
float lll1ll1; |
|
|
|
long I1II = 0L; |
|
|
|
long llll11l = 0L; |
|
|
|
float llll111 = 0.0F; |
|
|
|
final float[] lll1lll = new float[4]; |
|
|
|
final short[] lll11ll = new short[] { |
|
-5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, |
|
-8064, -7808, -6528, -6272, -7040, -6784, -2752, -2624, -3008, -2880, |
|
-2240, -2112, -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, |
|
-3520, -3392, -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, |
|
-30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008, -10496, |
|
-12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616, |
|
-13056, -12544, -14080, -13568, -344, -328, -376, -360, -280, -264, |
|
-312, -296, -472, -456, -504, -488, -408, -392, -440, -424, |
|
-88, -72, -120, -104, -24, -8, -56, -40, -216, -200, |
|
-248, -232, -152, -136, -184, -168, -1376, -1312, -1504, -1440, |
|
-1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, -1568, |
|
-1760, -1696, -688, -656, -752, -720, -560, -528, -624, -592, |
|
-944, -912, -1008, -976, -816, -784, -880, -848, 5504, 5248, |
|
6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, |
|
6528, 6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, |
|
2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, |
|
22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, |
|
32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, |
|
8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, |
|
14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, |
|
472, 456, 504, 488, 408, 392, 440, 424, 88, 72, |
|
120, 104, 24, 8, 56, 40, 216, 200, 248, 232, |
|
152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, |
|
1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, |
|
688, 656, 752, 720, 560, 528, 624, 592, 944, 912, |
|
1008, 976, 816, 784, 880, 848 }; |
|
|
|
boolean IIII = false; |
|
|
|
int IlII = 5; |
|
|
|
float I1lI = 0.0F; |
|
|
|
int IIlI = 0; |
|
|
|
float IllI = 0.0F; |
|
|
|
float[] lll1111 = new float[272]; |
|
|
|
float[] lll111l = new float[1552]; |
|
|
|
byte[] lll11l1 = new byte[3120]; |
|
|
|
int I11l = 1; |
|
|
|
float[] lll1l11 = new float[20]; |
|
|
|
int II1l = 1; |
|
|
|
int Il1l = 0; |
|
|
|
static Class I1Il; |
|
|
|
public static void main(String[] paramArrayOfString) { |
|
System.out.println("Copyright 2007-2016, Pieter-Tjerk de Boer, PA3FWM, [email protected] - All rights reserved."); |
|
System.out.println("Since the intended use of this (or any) applet involves sending a copy to the client computer, I (PA3FWM) hereby allow making it available unmodified, as part of the original .jar file, via my original WebSDR server software, to original WebSDR clients."); |
|
System.out.println("Other use, including distribution in part or entirety in other forms or as part of other software, or reverse engineering is not allowed without my explicit prior permission."); |
|
} |
|
|
|
public void stop() { |
|
this.I111 = null; |
|
this.IIl = "stop()"; |
|
I(); |
|
} |
|
|
|
public void destroy() { |
|
stop(); |
|
} |
|
|
|
public void paint(Graphics paramGraphics) { |
|
paramGraphics.drawString("WebSDR sound applet", 10, 10); |
|
paramGraphics.drawString("Copyright 2007-2016, P.T. de Boer, [email protected]", 10, 24); |
|
paramGraphics.drawString("Java version: " + System.getProperty("java.version"), 10, 88); |
|
if (this.II11) |
|
return; |
|
paramGraphics.drawString(this.I11 + " " + this.IIl + " " + this.Ill + this.l, 10, 40); |
|
paramGraphics.drawString(this.III + " " + this.I1I, 10, 52); |
|
paramGraphics.drawString(this.I1l + " " + 200.0F, 10, 64); |
|
paramGraphics.drawString((int)(0.5D + (this.IlI1 * 8000.0F)) + " " + (int)(0.5D + (this.III1 - 1.0D) * 1000000.0D) + " " + (int)(0.5D + (1.0D - this.IIl1 / 6.0D / this.I1l1 * this.IlI1) * 1000000.0D), 10, 76); |
|
} |
|
|
|
void I() { |
|
if (this.II11) |
|
return; |
|
repaint(); |
|
} |
|
|
|
public void mouseEntered(MouseEvent paramMouseEvent) {} |
|
|
|
public void mouseExited(MouseEvent paramMouseEvent) {} |
|
|
|
public void mouseReleased(MouseEvent paramMouseEvent) {} |
|
|
|
public void mousePressed(MouseEvent paramMouseEvent) {} |
|
|
|
public void I(MouseEvent paramMouseEvent) {} |
|
|
|
public void mouseClicked(MouseEvent paramMouseEvent) { |
|
this.II11 = !this.II11; |
|
repaint(); |
|
} |
|
|
|
public int getid() { |
|
return this.Ill; |
|
} |
|
|
|
public int I1() { |
|
return this.smeter; |
|
} |
|
|
|
public String javaversion() { |
|
return System.getProperty("java.version"); |
|
} |
|
|
|
public void setparam(String paramString) { |
|
paramString = "GET /~~param?ppm=" + (int)(0.5D + (this.III1 - 1.0D) * 1000000.0D) + "&ppml=" + (int)(0.5D + (1.0D - this.IIl1 / 6.0D / this.I1l1 * this.IlI1) * 1000000.0D) + "&" + paramString + "\r\n\r\n"; |
|
try { |
|
this.Il.write(paramString.getBytes(), 0, paramString.length()); |
|
} catch (Exception exception) {} |
|
this.IIl1 = this.I1l1 = 0.0D; |
|
} |
|
|
|
public void setvolume(float paramFloat) { |
|
this.Il1I = paramFloat; |
|
} |
|
|
|
public void start() { |
|
AudioFormat audioFormat = new AudioFormat(48000.0F, 16, 1, true, false); |
|
DataLine.Info info = new DataLine.Info((I1Il == null) ? (I1Il = I("javax.sound.sampled.SourceDataLine")) : I1Il, audioFormat, 96000); |
|
try { |
|
this.I = (SourceDataLine)AudioSystem.getLine(info); |
|
this.I.open(audioFormat, 96000); |
|
} catch (LineUnavailableException lineUnavailableException) {} |
|
this.I.addLineListener(this); |
|
this.I.start(); |
|
try { |
|
int i = getCodeBase().getPort(); |
|
if (i < 0) |
|
i = 80; |
|
this.I1 = new Socket(getCodeBase().getHost(), i); |
|
this.II = this.I1.getInputStream(); |
|
this.Il = this.I1.getOutputStream(); |
|
this.Il.write("GET /~~stream?java=1&23\r\n\r\n".getBytes(), 0, 27); |
|
this.I11 = 1; |
|
I(); |
|
} catch (Exception exception) { |
|
this.I11 = -3; |
|
I(); |
|
} |
|
this.I11 = 4; |
|
this.IIl = "start()"; |
|
this.I111 = new Thread(this); |
|
this.I111.start(); |
|
JSObject.getWindow(this).eval("soundappletstarted()"); |
|
addMouseListener(this); |
|
I(); |
|
this.I1II = System.currentTimeMillis(); |
|
} |
|
|
|
void I(int paramInt) { |
|
if (this.Ill == -1) { |
|
this.Ill = paramInt; |
|
} else if ((paramInt & 0x8000) == 0) { |
|
this.smeter = paramInt; |
|
} else { |
|
paramInt &= 0x7FFF; |
|
if ((paramInt & 0x4000) == 0) |
|
this.IlI1 = paramInt / 8000.0F; |
|
} |
|
} |
|
|
|
void I1(int paramInt) { |
|
this.I1l1 += paramInt; |
|
this.Il1 = this.I.getBufferSize() - this.I.available(); |
|
if (!this.I.isActive()) { |
|
this.I1I++; |
|
this.Il1 = -1; |
|
} |
|
this.I11++; |
|
this.lll1l1l[0] = this.lll1l1l[1]; |
|
this.lll1l1l[1] = this.lll1l1l[2]; |
|
this.lll1l1l[2] = this.I.getFramePosition() / 48.0F - (float)(System.currentTimeMillis() - this.I1II); |
|
if (this.lll1l1l[1] > this.lll1l1l[0] && this.lll1l1l[1] > this.lll1l1l[2]) |
|
this.lll1ll1 = 0.1F * this.lll1l1l[1] + 0.9F * this.lll1ll1; |
|
for (byte b2 = 0; b2 < paramInt; b2++) { |
|
for (byte b = 0; b < 6; b++) { |
|
byte b3; |
|
float[] arrayOfFloat2 = { |
|
-0.0030657F, -0.0027421F, -0.0028342F, -0.0018084F, 5.5067E-4F, 0.0040855F, 0.0081821F, 0.011793F, 0.01366F, 0.01262F, |
|
0.0080115F, 1.7366E-5F, -0.010139F, -0.020236F, -0.027388F, -0.028593F, -0.02145F, -0.0048089F, 0.020752F, 0.052804F, |
|
0.087352F, 0.11948F, 0.14428F, 0.15778F, 0.15778F, 0.14428F, 0.11948F, 0.087352F, 0.052804F, 0.020752F, |
|
-0.0048089F, -0.02145F, -0.028593F, -0.027388F, -0.020236F, -0.010139F, 1.7366E-5F, 0.0080115F, 0.01262F, 0.01366F, |
|
0.011793F, 0.0081821F, 0.0040855F, 5.5067E-4F, -0.0018084F, -0.0028342F, -0.0027421F, -0.0030657F }; |
|
float[] arrayOfFloat1 = { |
|
-0.0024615F, -0.0072497F, -0.0080908F, -0.0078587F, -0.0024454F, 0.0045784F, 0.010045F, 0.009404F, 0.0018009F, -0.0092801F, |
|
-0.016675F, -0.013973F, -1.8887E-4F, 0.017873F, 0.028294F, 0.020954F, -0.0048033F, -0.036754F, -0.053709F, -0.035879F, |
|
0.023444F, 0.11149F, 0.19934F, 0.25408F, 0.25408F, 0.19934F, 0.11149F, 0.023444F, -0.035879F, -0.053709F, |
|
-0.036754F, -0.0048033F, 0.020954F, 0.028294F, 0.017873F, -1.8887E-4F, -0.013973F, -0.016675F, -0.0092801F, 0.0018009F, |
|
0.009404F, 0.010045F, 0.0045784F, -0.0024454F, -0.0078587F, -0.0080908F, -0.0072497F, -0.0024615F }; |
|
this.lll111l[16 + 6 * b2 + b] = 0.0F; |
|
if (this.Il11) { |
|
for (b3 = 0; b3 < 8; b3++) |
|
this.lll111l[16 + 6 * b2 + b] = this.lll111l[16 + 6 * b2 + b] + this.lll1111[b2 + 7 + b3] * arrayOfFloat1[6 * b3 + 5 - b]; |
|
} else { |
|
for (byte b4 = 0; b4 < 8; b4++) |
|
this.lll111l[16 + 6 * b2 + b] = this.lll111l[16 + 6 * b2 + b] + this.lll1111[b2 + 7 + b4] * b3[6 * b4 + 5 - b]; |
|
} |
|
this.lll111l[16 + 6 * b2 + b] = this.lll111l[16 + 6 * b2 + b] * 6.0F; |
|
} |
|
} |
|
int i = paramInt * 6; |
|
byte b1; |
|
for (b1 = 0; this.I1lI < i; b1++) { |
|
int j = (int)this.I1lI + 16; |
|
float f1 = this.I1lI - (j - 16); |
|
f1 = (1.0F - f1) * this.lll111l[j - 1] + f1 * this.lll111l[j]; |
|
if (2 * b1 > 3100) |
|
break; |
|
this.lll11l1[2 * b1] = (byte)((int)f1 & 0xFF); |
|
this.lll11l1[2 * b1 + 1] = (byte)((int)f1 >> 8); |
|
this.I1lI = (float)(this.I1lI + this.III1 * this.IlI1); |
|
} |
|
this.I1lI -= i; |
|
if (this.IIlI == 0) { |
|
this.I.write(this.lll11l1, 0, b1 * 2); |
|
this.IIl1 += b1; |
|
} else if (b1 < this.IIlI) { |
|
this.IIlI -= b1; |
|
} else { |
|
this.I.write(this.lll11l1, this.IIlI * 2, (b1 - this.IIlI) * 2); |
|
this.IIlI = 0; |
|
this.IIl1 += (b1 - this.IIlI); |
|
} |
|
if (this.llll11l == 0L) |
|
this.llll111 = (float)this.llll11l; |
|
this.llll11l += b1; |
|
this.lll1lll[0] = this.lll1lll[1]; |
|
this.lll1lll[1] = this.lll1lll[2]; |
|
this.lll1lll[2] = this.lll1lll[3]; |
|
this.lll1lll[3] = (float)this.llll11l / 48.0F - (float)(System.currentTimeMillis() - this.I1II); |
|
if (this.IIlI == 0 && this.lll1lll[3] < this.lll1ll1 && this.llll111 > this.lll1ll1 + 150.0F) { |
|
this.IIlI = (int)(this.lll1ll1 - this.lll1lll[3]); |
|
this.III++; |
|
this.llll111 -= this.IIlI; |
|
this.lll1lll[0] = this.lll1lll[0] - this.IIlI; |
|
this.lll1lll[1] = this.lll1lll[1] - this.IIlI; |
|
this.lll1lll[2] = this.lll1lll[2] - this.IIlI; |
|
this.lll1lll[3] = this.lll1lll[3] - this.IIlI; |
|
this.lll1ll1 -= this.IIlI; |
|
this.IIlI *= 48; |
|
this.llll11l -= this.IIlI; |
|
} |
|
if (this.lll1lll[1] > this.lll1lll[0] && this.lll1lll[1] > this.lll1lll[2] && this.lll1lll[1] > this.lll1lll[3]) |
|
this.llll111 = this.lll1lll[1]; |
|
for (paramInt = 0; paramInt < 16; paramInt++) { |
|
this.lll111l[paramInt] = this.lll111l[i + paramInt]; |
|
this.lll1111[paramInt] = this.lll1111[i / 6 + paramInt]; |
|
} |
|
float f = this.llll111 - this.lll1ll1; |
|
this.I1l = (int)f; |
|
f -= 200.0F; |
|
f /= 3.0F; |
|
this.IllI = 0.999F * this.IllI + 0.001F * f; |
|
if (this.IllI < -40.0F) |
|
this.IllI = -40.0F; |
|
if (this.IllI > 40.0F) |
|
this.IllI = 40.0F; |
|
this.III1 = (1.0F + this.IllI * 5.0E-5F); |
|
if (f > 200.0F) { |
|
this.IIlI = (int)f; |
|
this.III++; |
|
this.llll111 -= this.IIlI; |
|
this.lll1lll[0] = this.lll1lll[0] - this.IIlI; |
|
this.lll1lll[1] = this.lll1lll[1] - this.IIlI; |
|
this.lll1lll[2] = this.lll1lll[2] - this.IIlI; |
|
this.lll1lll[3] = this.lll1lll[3] - this.IIlI; |
|
this.IIlI *= 48; |
|
this.llll11l -= this.IIlI; |
|
} |
|
} |
|
|
|
void I(float paramFloat, int paramInt) { |
|
for (byte b = 19; b > 0; b--) |
|
this.lll1l11[b] = this.lll1l11[b - 1]; |
|
this.lll1l11[0] = paramFloat; |
|
float f = this.lll1l11[10]; |
|
if (this.II1l >= 0) { |
|
f = 0.0F; |
|
float[][] arrayOfFloat = { { 0.0416798F, -0.0010372F, -0.0316519F, 0.0592284F, -0.0496101F, -0.0066906F, 0.0774353F, -0.0963F, -0.0179755F, 0.5594503F }, { 0.030725F, 0.062421F, -0.028814F, -0.027426F, -0.056624F, -0.034655F, 0.021408F, 0.110595F, 0.199341F, 0.255473F } }; |
|
for (byte b1 = 0; b1 < 10; b1++) |
|
f += arrayOfFloat[this.II1l][b1] * (this.lll1l11[b1] + this.lll1l11[19 - b1]); |
|
} |
|
this.lll1111[paramInt + 16] = f * this.Il1I; |
|
if (paramInt == 127) |
|
I1(128); |
|
} |
|
|
|
public void run() { |
|
byte[] arrayOfByte = new byte[264]; |
|
int[] arrayOfInt3 = new int[20]; |
|
int[] arrayOfInt2 = new int[20]; |
|
int[] arrayOfInt1 = new int[20]; |
|
int m = 0; |
|
byte b1 = 0; |
|
byte b = -1; |
|
char c = Character.MIN_VALUE; |
|
int k = 0; |
|
int j = 256; |
|
int i = 0; |
|
this.Ill = -1; |
|
try { |
|
while (Thread.currentThread() == this.I111) { |
|
this.I11++; |
|
I(); |
|
this.I1I1 = this.l; |
|
int i1 = 0; |
|
int n = 0; |
|
while (c < ') { |
|
i1 = this.II.read(arrayOfByte, m, 260 - m); |
|
if (i1 < 0) |
|
break; |
|
m += i1; |
|
boolean bool = true; |
|
while (bool && m > 0) { |
|
int i2 = 0; |
|
if (b == -1) { |
|
if (m < 2) { |
|
bool = false; |
|
} else { |
|
b = 0; |
|
int i3 = (arrayOfByte[0] & 0xFF) + ((arrayOfByte[1] & 0xFF) << 8); |
|
I(i3); |
|
i2 = 2; |
|
} |
|
} else if (b == 0) { |
|
if ((arrayOfByte[0] & 0x80) != 128) { |
|
n = 1; |
|
b = 2; |
|
c = Character.MIN_VALUE; |
|
} else if (arrayOfByte[0] >= -112 && arrayOfByte[0] <= -33) { |
|
n = 4; |
|
b = 2; |
|
c = Character.MIN_VALUE; |
|
i = 6 - (0xF & arrayOfByte[0] - 128 >> 4); |
|
} else if (arrayOfByte[0] == Byte.MIN_VALUE) { |
|
b = 1; |
|
i2 = 1; |
|
} else if ((arrayOfByte[0] & 0xF0) == 240) { |
|
if (m < 2) { |
|
bool = false; |
|
} else { |
|
this.smeter = 10 * (((arrayOfByte[0] & 0xF) << 8) + (arrayOfByte[1] & 0xFF)); |
|
i2 = 2; |
|
} |
|
} else if (arrayOfByte[0] == -127) { |
|
if (m < 3) { |
|
bool = false; |
|
} else { |
|
int i3 = (arrayOfByte[1] << 8) + (arrayOfByte[2] & 0xFF); |
|
this.IlI1 = i3 / 8000.0F; |
|
i2 = 3; |
|
} |
|
} else if (arrayOfByte[0] == -126) { |
|
if (m < 3) { |
|
bool = false; |
|
} else { |
|
int i3 = (arrayOfByte[1] << 8) + (arrayOfByte[2] & 0xFF); |
|
j = i3; |
|
i2 = 3; |
|
} |
|
} else if (arrayOfByte[0] == -125) { |
|
if (m < 2) { |
|
bool = false; |
|
} else { |
|
this.Il1l = arrayOfByte[1]; |
|
this.II1l = (arrayOfByte[1] & 0xF) - 1; |
|
if (this.II1l == 2) { |
|
this.II1l = 0; |
|
this.Il11 = true; |
|
} else { |
|
this.Il11 = false; |
|
} |
|
i2 = 2; |
|
} |
|
} else if (arrayOfByte[0] == -124) { |
|
i2 = 1; |
|
c = '; |
|
for (byte b2 = 0; b2 < '; b2++) |
|
this.lll1111[b2 + 16] = 0.0F; |
|
I1(128); |
|
for (i1 = 0; i1 < 20; i1++) { |
|
arrayOfInt2[i1] = 0; |
|
arrayOfInt3[i1] = 0; |
|
} |
|
k = 0; |
|
} else if (arrayOfByte[0] == -123) { |
|
if (m < 7) { |
|
bool = false; |
|
} else { |
|
i2 = 7; |
|
} |
|
} else { |
|
i2 = 1; |
|
this.IIII = true; |
|
bool = false; |
|
} |
|
} else if (b == 1) { |
|
if (m < 128 || c == ') { |
|
bool = false; |
|
} else { |
|
for (byte b2 = 0; b2 < 20; b2++) { |
|
arrayOfInt2[b2] = 0; |
|
arrayOfInt3[b2] = 0; |
|
} |
|
k = 0; |
|
i1 = 0; |
|
while (i1 < m && c < ') { |
|
this.lll1111[c + 16] = this.lll11ll[(short)arrayOfByte[i1] & 0xFF]; |
|
I(this.lll11ll[(short)arrayOfByte[i1] & 0xFF], c); |
|
i1++; |
|
c++; |
|
} |
|
i2 = 128; |
|
b = 0; |
|
bool = false; |
|
} |
|
} |
|
if (b == 2) { |
|
i1 = 0; |
|
byte b2 = ((this.Il1l & 0x10) == 16) ? 12 : 14; |
|
while (i1 < m && c < ') { |
|
int i4 = (arrayOfByte[i1 + 3] & 0xFF) + ((arrayOfByte[i1 + 2] & 0xFF) << 8) + ((arrayOfByte[i1 + 1] & 0xFF) << 16) + ((arrayOfByte[i1 + 0] & 0xFF) << 24); |
|
int i5 = i4 << n; |
|
int i10 = n; |
|
int i9 = i5; |
|
byte b3 = 0; |
|
int i6 = 15 - i; |
|
int i8 = j; |
|
int[] arrayOfInt = { 999, 999, 8, 4, 2, 1, 99, 99 }; |
|
if (i5 != 0) |
|
while ((i5 & Integer.MIN_VALUE) == 0 && b3 < i6) { |
|
i5 <<= 1; |
|
b3++; |
|
} |
|
if (b3 < i6) { |
|
i7 = b3; |
|
b3++; |
|
i6 = i5 << 1; |
|
} else { |
|
i7 = i5 >> 24 & 0xFF; |
|
b3 += 8; |
|
i6 = i5 << 8; |
|
} |
|
i5 = 0; |
|
if (i7 >= arrayOfInt[i]) |
|
i5++; |
|
if (i7 >= arrayOfInt[i - 1]) |
|
i5++; |
|
if (i5 > i - 1) |
|
i5 = i - 1; |
|
int i3 = (i6 >> 16 & 0xFFFF) >> 17 - i & -1 << i5; |
|
i3 += i7 << i - 1; |
|
if ((i6 & 1 << 32 - i + i5) != 0) { |
|
i3 |= (1 << i5) - 1; |
|
i3 ^= 0xFFFFFFFF; |
|
} |
|
for (n += b3 + i - i5; n >= 8; n -= 8) |
|
i1++; |
|
if (i9 == 0 || i1 + (7 + n) / 8 > m) { |
|
bool = false; |
|
n = i10; |
|
break; |
|
} |
|
i2 = i1; |
|
i6 = 0; |
|
for (i5 = 0; i5 < 20; i5++) |
|
i6 += arrayOfInt3[i5] * arrayOfInt2[i5]; |
|
i5 = i6 / 4096; |
|
int i7 = i3 * i8 + i8 / 2; |
|
i6 = i7 >> 4; |
|
for (i3 = 0; i3 < 20; i3++) |
|
arrayOfInt3[i3] = arrayOfInt3[i3] + -(arrayOfInt3[i3] >> 7) + (arrayOfInt2[i3] * i6 >> b2); |
|
for (i3 = 19; i3 > 0; i3--) { |
|
arrayOfInt2[i3] = arrayOfInt2[i3 - 1]; |
|
arrayOfInt1[i3] = arrayOfInt1[i3 - 1]; |
|
} |
|
arrayOfInt2[0] = i5 + i7; |
|
i3 = i5 + i7 * this.I1I1 + (k >> 4); |
|
if ((this.Il1l & 0x10) == 16) { |
|
k = 0; |
|
} else { |
|
k += arrayOfInt2[0] << 4 >> 3; |
|
} |
|
I(i3, c); |
|
c++; |
|
} |
|
if (c == ') { |
|
b = 0; |
|
if (n > 0) { |
|
i2++; |
|
n = 0; |
|
} |
|
} |
|
b1++; |
|
} |
|
if (i2 > 0) |
|
for (i1 = i2; i1 < m; i1++) |
|
arrayOfByte[i1 - i2] = arrayOfByte[i1]; |
|
m -= i2; |
|
} |
|
if (this.IIII || m < 0) |
|
break; |
|
} |
|
if (c == ') |
|
c = Character.MIN_VALUE; |
|
this.II1 = i1; |
|
this.I11++; |
|
if (this.IIII || i1 == -1) |
|
break; |
|
} |
|
} catch (IOException iOException) { |
|
this.IIl = "!" + iOException.getMessage(); |
|
} |
|
this.IIl = "^" + this.IIl; |
|
this.I.flush(); |
|
this.I.stop(); |
|
this.I.close(); |
|
try { |
|
this.I1.close(); |
|
} catch (Exception exception) {} |
|
this.I11 = -5; |
|
I(); |
|
} |
|
|
|
public void update(LineEvent paramLineEvent) {} |
|
|
|
static Class I(String paramString) { |
|
try { |
|
return Class.forName(paramString); |
|
} catch (ClassNotFoundException classNotFoundException) { |
|
throw (new NoClassDefFoundError()).initCause(classNotFoundException); |
|
} |
|
} |
|
} |
I have reason to believe that there was a kind of packet structure / framing introduced. The first byte in every package is the almost everytime the same. I did not get it to run but did not sink a lot of time into it by now. This leads me to believe that the author started to do asynchronous resampling or injecting data into the stream. In any case, it seems like there's a 'length' field now.
The code is so convoluted it's very hard to read it. It might be better to reimplement the functionality using the webaudio API and/or run our own server.
@mrzachhigginsofficial Did you run this through a codec, deinterleave the obtained samples and IQ demodulate it after?
When I tune to a stationary signal (keyed beacon for example) the data rate drops from 750bytes/message to 420bytes/message so I assume the/a codec is still in play.