Bug fix: actually use the available value computed a line above.

This commit is contained in:
Ray J. Greenwell
2026-05-09 20:10:45 -07:00
parent 8f7be7fe9f
commit c77177368c
@@ -212,7 +212,7 @@ public class WaveData {
if(available <= 0) {
available = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8;
}
byte[] buf = new byte[ais.available()];
byte[] buf = new byte[available];
int read = 0, total = 0;
while ((read = ais.read(buf, total, buf.length - total)) != -1
&& total < buf.length) {