Brain (Should that be "Brian"?),
The AudioClip interface is what you want. It has three methods:
play()
loop()
stop()
I'm pretty sure that the only supported format for sound files is
.au, although this may have changed in later versions of the JDK. It is a simple matter to save a
.wav file as
.au though.
You can have multiple AudioClip objects playing at the same time, and they will be mixed together.
Unfortunately, the sound is not actually loaded until the first time you call play(), so there is a slight delay that first time. But not on successive plays. You may be able to avoid the delay by using a MediaTracker object...
Look both of these up in the API for more.
------------------
- Ryan Burgdorfer
- Java Acolyte in
- Columbus, OH USA
[This message has been edited by ryan burgdorfer (edited March 22, 2001).]