lib 1001094 // JavaLayer 1.0.1 import javazoom.jl.player.*; static void playMp3(File mp3) ctex { if (isLinux() && onPATH("play")) { print("Playing MP3 (`play`)..."); backtick("play " + bashQuote(mp3)); ret; } FileInputStream fis = new FileInputStream(mp3); Player player = new Player(fis); player.play(); repeat with sleep 10 { if (player.isComplete()) break; } player.close(); fis.close(); } static void playMp3(S snippetID) { playMp3(loadLibrary(snippetID)); }