Hallo, da der Themenersteller diesen Thread aufmachte, poste ich es hier, wenn es ok ist?
Was steht in diesem Code ganz genau?
Was steht in diesem Code ganz genau?
Java:
public static void main(String[] args) throws InterruptedException {
//Create new PlayerCore instance
PlayerCore core = new PlayerCore();
//Open an audio file
try {
core.open(new URL("file:///" + System.getProperty("user.dir") + "/sounds/track39.mp3"));
} catch (MalformedURLException e) {
e.printStackTrace();
}
core.play(); //Testing play function
Thread.sleep(5000); //Wait 5s
core.pause(); //Testing pause function
Thread.sleep(2500); //Wait 2.5s
core.resume(); //Testing resume function
Thread.sleep(10000); //Wait 10s
core.stop(); //Testing stop function
Thread.sleep(2500); //Wait 2.5s
core.play(); //Start audio file again and play it until it ends
Zuletzt bearbeitet von einem Moderator: