예제 #1
0
파일: GUI.java 프로젝트: BNHeadrick/AFM-GUI
 public void execute(int globalTime) {
   if (!ap.isPlaying()) {
     int playAt = globalTime - timeStamp;
     ap.play(playAt);
     println("gTime is " + globalTime + " delTime is " + playAt);
   }
 }
예제 #2
0
  /** Returns true if the song has been played through, otherwise false */
  public boolean isEndOfSong() {
    if (songOver) return true;

    if (!song.isPlaying() && !ourPause) { // If song is not playing and we did not pause
      songOver = true;
      return true;
    } else return false;
  }
예제 #3
0
 /** Fades the song out, then pauses the song. */
 public void pauseSong() {
   if (!fadeEnter) {
     songPause = System.currentTimeMillis();
     setGainShift(-30);
     fadeEnter = true;
   }
   if (song.isPlaying() && (System.currentTimeMillis() - songPause) >= songFade) {
     song.pause();
   }
   ourPause = true;
 }
예제 #4
0
 public boolean isPlaying() {
   return song.isPlaying();
 }