forked from tetratec/runescape-classic-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d520660
commit 8840c13
Showing
117 changed files
with
31,528 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.rscdaemon.client; | ||
|
||
import java.io.InputStream; | ||
|
||
public class AudioReader extends InputStream { | ||
|
||
private byte[] dataArray; | ||
private int offset; | ||
private int length; | ||
|
||
public AudioReader() { | ||
} | ||
|
||
public void stopAudio() { | ||
} | ||
|
||
public void loadData(byte[] abyte0, int i, int j) { | ||
dataArray = abyte0; | ||
offset = i; | ||
length = i + j; | ||
} | ||
|
||
public int read(byte[] abyte0, int i, int j) { | ||
for (int k = 0; k < j; k++) { | ||
if (offset < length) { | ||
abyte0[i + k] = dataArray[offset++]; | ||
} | ||
else { | ||
abyte0[i + k] = -1; | ||
} | ||
} | ||
return j; | ||
} | ||
|
||
public int read() { | ||
byte abyte0[] = new byte[1]; | ||
read(abyte0, 0, 1); | ||
return abyte0[0]; | ||
} | ||
} |
Oops, something went wrong.