コード例 #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
ファイル: SoundControl.java プロジェクト: Jrokisky/Sonance
  /** 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
ファイル: SoundControl.java プロジェクト: Jrokisky/Sonance
 /** 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
ファイル: SoundControl.java プロジェクト: Jrokisky/Sonance
 public boolean isPlaying() {
   return song.isPlaying();
 }