How to play multiple Clip instances?

I've looked over this reference on Java sound, and made a clip play.

URL url = new URL("http://www.chiptape.com/chiptape/sounds/medium/Taito_Carousel.wav");
AudioInputStream ais = AudioSystem.getAudioInputStream(url);
clip = AudioSystem.getClip();

clip.open(ais);
clip.loop(0); //This lets the clip play fully before closing immediately

When I play this once, it works just fine, but when I want to play the same clip again with clip.open(ais), it doesn't play. Any ideas?


ANSWERS:


javax.sound.sampled.Clip is not the easiest.

But this tutorial is a good start:

When you're ready to start playback, simply invoke the start method. To stop or pause the clip, invoke the stop method, and to resume playback, invoke start again. The clip remembers the media position where it stopped playback, so there's no need for explicit pause and resume methods. If you don't want it to resume where it left off, you can "rewind" the clip to the beginning (or to any other position, for that matter) using the frame- or microsecond-positioning methods mentioned above.

As Andrew says, if you post an example of the code, that would help folks to answer questions. But I'm guessing you are also just needing more background info, so that is why I'm giving the above links--which everyone dealing with Java Sound should know about.

Good luck!



 MORE:


 ? Java play multiple Clips simultaneously
 ? Clip plays WAV file with bad lag in Java
 ? Playing a song in java
 ? Java sound control not working
 ? Java sound control not working
 ? Java sound control not working
 ? Java playing sounds. Is there a default system sound?
 ? Java Sound locale support
 ? PAN not works in java sound api
 ? automatic volume control for loud sounds played