looks like the output is Left and Right channels interleaved, only sample one for...
authorjjenista <jjenista>
Fri, 28 Oct 2011 00:31:49 +0000 (00:31 +0000)
committerjjenista <jjenista>
Fri, 28 Oct 2011 00:31:49 +0000 (00:31 +0000)
Robust/src/Benchmarks/SSJava/MP3Decoder/Player.java
Robust/src/Benchmarks/SSJava/MP3Decoder/makefile

index b713ca1d834e8c8b8771523f7a1a60d07ea91556..a19768ec23fdb5a5147e6ccae26a826337885dec 100644 (file)
@@ -208,24 +208,13 @@ public class Player {
       // @LOC("O") SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h);\r
       decoder.decodeFrame(h);\r
 \r
-      // eom debug\r
-      @LOC("C") int sum = 0;\r
-      @LOC("C") short[] outbuf = SampleBufferWrapper.getBuffer();\r
-      // short[] outbuf = output.getBuffer();\r
-      TERMINATE: for (@LOC("C") int i = 0; i < SampleBufferWrapper.getBufferLength(); i++) {\r
-        // System.out.println(outbuf[i]);\r
-        sum += outbuf[i];\r
+      // it looks like there is left and right channel interleaved into the\r
+      // output buffer, so only sample one channel (stride=2)\r
+      short[] outbuf = SampleBufferWrapper.getBuffer();\r
+      TERMINATE: for (@LOC("C") int i = 0; i < SampleBufferWrapper.getBufferLength(); i = i + 2) {\r
+        System.out.println( sampleNumber+" "+outbuf[i] );\r
+        sampleNumber++;\r
       }\r
-      //System.out.println(sum);\r
-      //\r
-\r
-      //int stride = outbuf.length / 100;\r
-      //for( int i = 0; i < 100; ++i ) {\r
-      //  System.out.println( sampleNumber+" "+outbuf[i*stride] );\r
-      //  sampleNumber++;\r
-      //}\r
-      System.out.println( sampleNumber+" "+sum );\r
-      sampleNumber++;\r
 \r
 \r
 \r
index 989f86d16f5c0a8be93e21456f2b42f964234ac5..83adb837424f58eea83e235ccc6d04bc188fb63b 100644 (file)
@@ -1,7 +1,7 @@
 BUILDSCRIPT=../../../buildscript
 
 PROGRAM=MP3Player
-SOURCE_FILES=MP3Player.java
+SOURCE_FILES=MP3Player.java Player.java
 
 ifndef INV_ERROR_PROB
 INV_ERROR_PROB=1000