![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e725. Continuously Playing a Sampled Audio FileOnlyDataLine objects that are of type Clip can be repeated.
To create a clip, see e723 Loading and Playing Sampled Audio.
// Play once clip.start(); // Play and loop forever clip.loop(Clip.LOOP_CONTINUOUSLY); // Play and repeat for a certain number of times int numberOfPlays = 3; clip.loop(numberOfPlays-1);
e724. Playing Streaming Sampled Audio
© 2002 Addison-Wesley. |