/**\r
* The current frame number.\r
*/\r
- \r
+\r
private int frame = 0;\r
\r
/**\r
/**\r
* Has the player been closed?\r
*/\r
- \r
+\r
private boolean closed = false;\r
\r
/**\r
* Has the player played back all frames from the stream?\r
*/\r
- \r
+\r
private boolean complete = false;\r
\r
- \r
private int lastPosition = 0;\r
\r
- \r
private long sampleNumber;\r
\r
/**\r
* @return true if the last frame was played, or false if there are more\r
* frames.\r
*/\r
- \r
- \r
- public boolean play( int frames) throws JavaLayerException {\r
- boolean ret = true;\r
+\r
+ public boolean play(int frames) throws JavaLayerException {\r
+ boolean ret = true;\r
\r
// initialization before ssjava loop\r
- boolean init = true;\r
- Header h = BitstreamWrapper.readFrame();\r
+ boolean init = true;\r
+ Header h = BitstreamWrapper.readFrame();\r
decoder.init(h);\r
\r
sampleNumber = 1;\r
System.out.println("Gobble sentinel: +++");\r
\r
- // int count = 0;\r
+ // int count = 0;\r
SSJAVA: while (true) {\r
if (h == null) {\r
break;\r
* \r
* @return true if there are no more frames to decode, false otherwise.\r
*/\r
- \r
- protected boolean decodeFrame( boolean init, Header h)\r
- throws JavaLayerException {\r
+\r
+ protected boolean decodeFrame(boolean init, Header h) throws JavaLayerException {\r
try {\r
// AudioDevice out = audio;\r
// if (out==null)\r
// if (h == null){\r
// return false;\r
// }\r
- \r
- // SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h);\r
+\r
+ // SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h);\r
decoder.decodeFrame(h);\r
\r
-// DEBUG_OUTPUT_CHECKSUM();\r
-// DEBUG_OUTPUT();\r
+ // DEBUG_OUTPUT_CHECKSUM();\r
+ // DEBUG_OUTPUT();\r
// synchronized (this)\r
// {\r
// out = audio;\r
@TRUST\r
public void DEBUG_OUTPUT_CHECKSUM() {\r
// eom debug\r
- int sum = 0;\r
- short[] outbuf = SampleBufferWrapper.getBuffer();\r
+ int sum = 0;\r
+ short[] outbuf = SampleBufferWrapper.getBuffer();\r
// short[] outbuf = output.getBuffer();\r
- TERMINATE: for ( int i = 0; i < SampleBufferWrapper.getBufferLength(); i++) {\r
+ TERMINATE: for (int i = 0; i < SampleBufferWrapper.getBufferLength(); i++) {\r
// System.out.println(outbuf[i]);\r
sum += outbuf[i];\r
}\r