* @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
- 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
* \r
* @return true if there are no more frames to decode, false otherwise.\r
*/\r
- @LATTICE("C,O<THIS,THIS<IN,C*,THISLOC=THIS,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
// return false;\r
\r
// Header h = bitstream.readFrame();\r
- @LOC("IN") Header h = BitstreamWrapper.readFrame();\r
+ @LOC("THIS,Player.ST") Header h = BitstreamWrapper.readFrame();\r
\r
if (h == null)\r
return false;\r
@LOC("C") int sum = 0;\r
@LOC("C") short[] outbuf = SampleBufferWrapper.getBuffer();\r
// short[] outbuf = output.getBuffer();\r
+ TERMINATE:\r
for (@LOC("C") int i = 0; i < SampleBufferWrapper.getBufferLength(); i++) {\r
// System.out.println(outbuf[i]);\r
sum += outbuf[i];\r