having new variable 'inter' in-between "reorder/antialias" and "hybrid" in order...
[IRC.git] / Robust / src / Tests / ssJava / mp3decoder / Player.java
index 2c54b3d741cc763e31dd94a6e9fcf1f0fb202e71..d82e6e8919b8d49bad2ce04a23a01650e13aa970 100644 (file)
@@ -107,14 +107,17 @@ public class Player {
    * @return true if the last frame was played, or false if there are more\r
    *         frames.\r
    */\r
-  @LATTICE("IN<T,IN*,THISLOC=T")\r
-  @RETURNLOC("IN")\r
+  @LATTICE("T<IN,T*,IN*,THISLOC=T")\r
+  @RETURNLOC("T")\r
   public boolean play(@LOC("IN") int frames) throws JavaLayerException {\r
-    @LOC("IN") boolean ret = true;\r
-\r
-    int count = 0;\r
-    SSJAVA: while (frames-- > 0 && ret) {\r
+    @LOC("T") boolean ret = true;\r
+    \r
+    @LOC("T") int count=0;\r
+    SSJAVA: while (count++ < 2147483646) {\r
       ret = decodeFrame();\r
+      if(!ret){\r
+          break;\r
+      }\r
     }\r
 \r
     /*\r
@@ -171,8 +174,7 @@ public class Player {
    * \r
    * @return true if there are no more frames to decode, false otherwise.\r
    */\r
-  @LATTICE("O<TH,THISLOC=TH")\r
-  @RETURNLOC("O")\r
+  @LATTICE("C<THIS,O<THIS,THIS<IN,C*,THISLOC=THIS,RETURNLOC=O,GLOBALLOC=THIS")\r
   protected boolean decodeFrame() throws JavaLayerException {\r
     try {\r
       // AudioDevice out = audio;\r
@@ -180,7 +182,7 @@ public class Player {
       // return false;\r
 \r
       // Header h = bitstream.readFrame();\r
-      Header h = BitstreamWrapper.readFrame();\r
+      @LOC("THIS,Player.ST") Header h = BitstreamWrapper.readFrame();\r
 \r
       if (h == null)\r
         return false;\r
@@ -189,10 +191,11 @@ public class Player {
       decoder.decodeFrame(h);\r
 \r
       // eom debug\r
-      int sum = 0;\r
-      short[] outbuf = SampleBufferWrapper.getOutput().getBuffer();\r
+      @LOC("C") int sum = 0;\r
+      @LOC("C") short[] outbuf = SampleBufferWrapper.getBuffer();\r
       // short[] outbuf = output.getBuffer();\r
-      for (int i = 0; i < SampleBufferWrapper.getOutput().getBufferLength(); i++) {\r
+      TERMINATE:\r
+      for (@LOC("C") int i = 0; i < SampleBufferWrapper.getBufferLength(); i++) {\r
         // System.out.println(outbuf[i]);\r
         sum += outbuf[i];\r
       }\r