lib 1001094 // JavaLayer 1.0.1 import javazoom.jl.player.*; static void playWAVAndWait(File wav) ctex { if (callService('playWAVAndWait, wav)) ret; S method = soundPlayMethod(); if (eq(method, "aplay")) { print("Playing WAV (aplay)..."); backtick("aplay " + bashQuote(wav)); } else if (eq(method, "cmdmp3.exe")) { print("Playing WAV (cmdmp3.exe)..."); backtick(winQuote(cmdmp3_exe()) + " " + winQuote(wav)); } else { print("Playing WAV (JavaZoom), " + fileSize(wav) + " bytes..."); final Player player = new Player(new FileInputStream(wav)); player.play(); repeat with sleep 10 { if (player.isComplete()) break; } player.close(); } }