From 595eb56f9bfabf33920fb53345d6e774236cef93 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Tue, 25 Nov 2014 18:51:23 -0500 Subject: [PATCH] Throw exception if seeking a non-seekable audio stream --- jme3-core/src/main/java/com/jme3/audio/AudioStream.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/audio/AudioStream.java b/jme3-core/src/main/java/com/jme3/audio/AudioStream.java index 61c5ff744..33181787c 100644 --- a/jme3-core/src/main/java/com/jme3/audio/AudioStream.java +++ b/jme3-core/src/main/java/com/jme3/audio/AudioStream.java @@ -97,6 +97,7 @@ public class AudioStream extends AudioData implements Closeable { } return totalRead; } catch (IOException ex) { + ex.printStackTrace(); eof = true; return -1; } @@ -196,7 +197,7 @@ public class AudioStream extends AudioData implements Closeable { ((SeekableStream) in).setTime(time); eof = false; } else { - logger.log(Level.WARNING, + throw new IllegalStateException( "Cannot use setTime on a stream that " + "is not seekable. You must load the file " + "with the streamCache option set to true");