[java] AudioClip pb

Recommended Posts

Hi, I'm using AudioClip to play a sound. I have a pb : i dont know how to make play() blockant. clip = Applet.newAudioClip(new URL("file", "localhost", fileName_1)); clip.play(); clip = Applet.newAudioClip(new URL("file", "localhost", fileName_2)); clip.play(); it only plays de second one. I want it to play the first THEN the second. How could i do ?

Share on other sites
Not that it helps you out, but this seems to be contradicting its specification:
Multiple AudioClip items can be playing at the same time, and the resulting sound is mixed togetherto produce a composite.

Note that AudioClip is basically the most simple as it gets. Perhaps have a look at javax.sound.sampled.Clip, which allows you to check whether a sound is currently playing.

Greetz,

Illco

Create an account

Register a new account

• Forum Statistics

• Total Topics
628293
• Total Posts
2981870

• 11
• 10
• 10
• 11
• 17