FAQ Database Discussion Community


How to stop all currently playing clips in Java before playing a new one?

java,swing,javax.sound.sampled
I am making a Smart ATM application for my college project using Swing which can be used by people with visual disabilities as well. I have added mouse over listeners to every button so that the program plays a clip which speaks about the operation of that button. The problem...

Restarting a Clip object - flush() method

java,flush,javasound,clip,javax.sound.sampled
The Javadoc for DataLine.flush() states Flushes queued data from the line. The flushed data is discarded. In some cases, not all queued data can be discarded. For example, a mixer can flush data from the buffer for a specific input line, but any unplayed data already in the output buffer...

Random Access on AudioInputStream java

java,javax.sound.sampled
Is there an example of randomly accessing an AudioInputStream? something like any ordinary audio player does - when you take the bar wherever you want and it plays from wherever you want, how can i access bytes in the audio stream in that manner? something simple like that : read(byte[]...