mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Support switching tracks when music completes
This commit is contained in:
@@ -35,7 +35,6 @@ import java.util.MissingResourceException;
|
||||
*/
|
||||
public class AudioClip implements IAudioClip {
|
||||
private Clip clip;
|
||||
private final int SOUND_SYSTEM_DELAY = 30;
|
||||
|
||||
public static boolean fileExists(String fileName) {
|
||||
File fSound = new File(ForgeConstants.SOUND_DIR, fileName);
|
||||
@@ -74,7 +73,7 @@ public class AudioClip implements IAudioClip {
|
||||
}
|
||||
clip.setMicrosecondPosition(0);
|
||||
try {
|
||||
Thread.sleep(SOUND_SYSTEM_DELAY);
|
||||
Thread.sleep(SoundSystem.DELAY);
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -87,7 +86,7 @@ public class AudioClip implements IAudioClip {
|
||||
}
|
||||
clip.setMicrosecondPosition(0);
|
||||
try {
|
||||
Thread.sleep(SOUND_SYSTEM_DELAY);
|
||||
Thread.sleep(SoundSystem.DELAY);
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ public class AudioMusic implements IAudioMusic {
|
||||
public AudioMusic(String filename) {
|
||||
}
|
||||
|
||||
public void play() {
|
||||
public void play(final Runnable onComplete) {
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
|
||||
Reference in New Issue
Block a user