// @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