mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-17 07:49:18 +00:00
MP3 playing improved: block read
This commit is contained in:
@@ -88,6 +88,18 @@ public class MP3Decoder extends SoundDecoder {
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
len = Math.min(len, remaining);
|
||||
if (len > 0) {
|
||||
System.arraycopy(buf, pos, b, off, len);
|
||||
remaining -= len;
|
||||
pos += len;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
}
|
||||
|
||||
public MP3Decoder(SoundFormat soundFormat) {
|
||||
|
||||
Reference in New Issue
Block a user