English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

please send me a java program to run audio

2006-11-27 03:59:13 · 2 answers · asked by parthteotia 1 in Computers & Internet Software

2 answers

To simply play or loop an audio clip (wav, au, aiff, midi), use the AudioClip interface by getting an implementation via the Applet class.

URL clipURL = new File("sound.wav").toURL();
AudioClip clip = Applet.newAudioClip(myClipURL);
clip.play();

For anything beyond simple playing, take a look at the javax.sound framework (http://java.sun.com/j2se/1.5.0/docs/guide/sound/).

2006-11-27 15:47:03 · answer #1 · answered by vincentgl 5 · 0 0

try this one

2006-11-27 04:01:36 · answer #2 · answered by GOD 2 · 0 2

fedest.com, questions and answers