From 6ca140a1e24b41d5084bb1acf2f79d7c26f6145c Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Tue, 23 Oct 2012 01:24:10 +0200 Subject: Fix testAlBufferDataintintByteBufferintint ERROR java.io.IOException: mark/reset not supported. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [junit] Testcase: testAlBufferDataintintByteBufferintint took 0,021 sec [junit] Caused an ERROR [junit] mark/reset not supported [junit] java.io.IOException: mark/reset not supported [junit] at java.util.zip.InflaterInputStream.reset(InflaterInputStream.java:286) [junit] at java.io.FilterInputStream.reset(FilterInputStream.java:217) [junit] at com.sun.media.sound.SoftMidiAudioFileReader.getAudioInputStream(SoftMidiAudioFileReader.java:135) [junit] at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1111) [junit] at com.jogamp.openal.util.WAVLoader.loadFromStream(WAVLoader.java:87) [junit] at com.jogamp.openal.test.junit.ALTest.loadTestWAV(ALTest.java:386) [junit] at com.jogamp.openal.test.junit.ALTest.testAlBufferDataintintByteBufferintint(ALTest.java:281) Signed-off-by: Xerxes Rånby --- src/test/com/jogamp/openal/test/junit/ALTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/com/jogamp/openal/test/junit/ALTest.java b/src/test/com/jogamp/openal/test/junit/ALTest.java index 33d7b0d..d669a75 100644 --- a/src/test/com/jogamp/openal/test/junit/ALTest.java +++ b/src/test/com/jogamp/openal/test/junit/ALTest.java @@ -13,6 +13,7 @@ import com.jogamp.openal.ALCdevice; import com.jogamp.openal.ALFactory; import java.io.IOException; import java.io.InputStream; +import java.io.BufferedInputStream; import javax.sound.sampled.UnsupportedAudioFileException; @@ -383,6 +384,8 @@ public class ALTest { private WAVData loadTestWAV() throws IOException, UnsupportedAudioFileException { InputStream resource = ResourceLocation.getInputStream(TEST_FILE, true); - return WAVLoader.loadFromStream(resource); + // Add buffer for mark/reset support as required by getAudioInputStream. + InputStream bufferResource = new BufferedInputStream(resource); + return WAVLoader.loadFromStream(bufferResource); } } -- cgit v1.2.3