-
continuos audio
I'm trying to get a short wav file to loop continuously in an applet, but I'm having some trouble.
I wrote a for loop to do it but it doesn't work (the clip just plays once)
Heres my code:
Code:
for(int i=0; i<1000; i++)
{
wav.play();
}
If anyone could tell me how I could get this audio into a continuos loop it would be much appreciated, thanks.
-
Re: continuos audio
-
Re: continuos audio
AudioClip clip = Applet.newAudioClip(url);
clip.loop();
-
Re: continuos audio
-
Re: continuos audio
Quote:
Originally Posted by
Stoyicker
Dude, use this:
Whatever for? jsobel has already supplied the two-line solution. You can't get much easier than that.
db
-
Re: continuos audio
Come on, just wanted to help, I don't think an extra reply may hurt anyone.
-
Re: continuos audio
Suggesting the use of a third party class for something that's so easy to do with the standard JDK isn't helpful. It can be confusing.
db