Beispiel #1
0
 /**
  * Returns the position in the current track, in milliseconds. If no track is loaded, 0 will be
  * returned.
  */
 public static int getPosition() {
   if (isPlaying()) return (int) (player.getPosition() * 1000 + Options.getMusicOffset());
   else if (isPaused()) return Math.max((int) (pauseTime * 1000 + Options.getMusicOffset()), 0);
   else return 0;
 }
Beispiel #2
0
 /** Pauses the current track. */
 public static void pause() {
   if (isPlaying()) {
     pauseTime = player.getPosition();
     player.pause();
   }
 }