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

Method resume

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

Source from the content-addressed store, hash-verified

162 }
163
164 public void resume() {
165 if (ispaused == false || isplaying == false || isinitialized == false)
166 return;
167 if (init() == -1) {
168 Com.DPrintf("MP3 player failed to init resume\n");
169 isinitialized = false;
170 isplaying = false;
171 ispaused = false;
172 iserror = true;
173 return;
174 } else {
175 try {
176 fis.skip(totalbytes - currentpos);
177 } catch (IOException e) {
178 Com.DPrintf("MP3 player failed to skip resume\n");
179 isinitialized = false;
180 iserror = true;
181 ispaused = false;
182 isplaying = false;
183 }
184 isinitialized = true;
185 play();
186
187 if (iserror == false) {
188 ispaused = false;
189 Com.DPrintf("MP3 player has resumed.\n");
190 } else
191 Com.DPrintf("MP3 player resume failed?\n");
192 }
193 }
194
195 public void stop() {
196 if (isplaying == true) {

Callers 1

ResumeMethod · 0.80

Calls 3

initMethod · 0.95
DPrintfMethod · 0.95
playMethod · 0.95

Tested by

no test coverage detected