From c77177368cc10d3d0f10f899fe3c1d08df94250a Mon Sep 17 00:00:00 2001 From: "Ray J. Greenwell" Date: Sat, 9 May 2026 20:10:45 -0700 Subject: [PATCH] Bug fix: actually use the available value computed a line above. --- core/src/main/java/com/threerings/openal/util/WaveData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/threerings/openal/util/WaveData.java b/core/src/main/java/com/threerings/openal/util/WaveData.java index 7d95bd72..98530887 100644 --- a/core/src/main/java/com/threerings/openal/util/WaveData.java +++ b/core/src/main/java/com/threerings/openal/util/WaveData.java @@ -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) {