changes.
[IRC.git] / Robust / src / Tests / ssJava / mp3decoder / Player.java
index 75d5863b5e07491e711e22bbcef88f301a7777d1..14db695e2616bc5f207bab2cd4f2937ce24fe8cd 100644 (file)
@@ -1,3 +1,4 @@
+\r
 /*\r
  * 11/19/04            1.0 moved to LGPL.\r
  * 29/01/00            Initial version. mdm@techie.com\r
 /*\r
  * 11/19/04            1.0 moved to LGPL.\r
  * 29/01/00            Initial version. mdm@techie.com\r
@@ -19,8 +20,6 @@
  */\r
 \r
 \r
  */\r
 \r
 \r
-//import java.io.InputStream;\r
-\r
        \r
 /**\r
  * The <code>Player</code> class implements a simple player for playback\r
        \r
 /**\r
  * The <code>Player</code> class implements a simple player for playback\r
@@ -113,11 +112,13 @@ public class Player
        public boolean play(@LOC("IN") int frames) throws JavaLayerException\r
        {\r
            @LOC("IN") boolean ret = true;\r
        public boolean play(@LOC("IN") int frames) throws JavaLayerException\r
        {\r
            @LOC("IN") boolean ret = true;\r
-           \r
-            SSJAVA:\r
+         \r
+         \r
+           SSJAVA:\r
                while (frames-- > 0 && ret)\r
                {\r
                while (frames-- > 0 && ret)\r
                {\r
-                        ret = decodeFrame();\r
+                 System.out.println("DECODE");\r
+                  ret = decodeFrame();\r
                }\r
                /*\r
                if (!ret)\r
                }\r
                /*\r
                if (!ret)\r
@@ -219,7 +220,15 @@ public class Player
                                \r
                        // sample buffer set when decoder constructed\r
                        @LOC("O") SampleBuffer output = (SampleBuffer)decoder.decodeFrame(h, bitstream);\r
                                \r
                        // sample buffer set when decoder constructed\r
                        @LOC("O") SampleBuffer output = (SampleBuffer)decoder.decodeFrame(h, bitstream);\r
-                                                                                                                                                                                                                                                                                                       \r
+                                                                                                               \r
+                 // eom debug\r
+               short[] outbuf = output.getBuffer();\r
+               for (int i = 0; i < outbuf.length; i++) {\r
+//                 bw.write(outbuf[i]);\r
+                 System.out.println(outbuf[i]);\r
+               }\r
+               //\r
+               \r
                        //synchronized (this)\r
                        //{\r
                        //      out = audio;\r
                        //synchronized (this)\r
                        //{\r
                        //      out = audio;\r