소스 검색

Throw exception if seeking a non-seekable audio stream

shadowislord 10 년 전
부모
커밋
595eb56f9b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      jme3-core/src/main/java/com/jme3/audio/AudioStream.java

+ 2 - 1
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");