MCPcopy Create free account
hub / github.com/demoth/jake2 / play

Method play

client/src/main/java/jake2/client/MP3.java:210–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208 }
209
210 public void play() {
211 if (isplaying == true && ispaused == false || isinitialized == false)
212 return;
213
214 isplaying = true;
215 new Thread() {
216 public void run() {
217 try {
218 while (true) {
219 player.play();
220 if (islooping == false || ispaused == true) {
221 iscomplete = true;
222 break;
223 }
224 if (init() == -1) {
225 isinitialized = false;
226 iserror = true;
227 iscomplete = true;
228 Com.DPrintf("MP3 player error while looping.\n");
229 break;
230 }
231 isinitialized = true;
232 iserror = false;
233 Com.DPrintf("MP3 player looping track.\n");
234 }
235 Com.DPrintf("MP3 player finished track.\n");
236 }
237 catch (Exception e) {
238 Com.DPrintf("MP3 player failed to play.\n");
239 isplaying = false;
240 iserror = true;
241 }
242 }
243 }.start();
244 }
245}

Callers 3

resumeMethod · 0.95
runMethod · 0.80
PlayMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected