Mediaplayer with WAV
Posted on 1997-10-19
I'm writing a program that uses several different sounds (.WAV), each time the user clicks on a drawgrid a sound should play. I've done this by using 1 MediaPlayer. Because
there are several different sounds I always set the filename property of the MediaPlayer to the correct sound, then open and play it. This works, but is slow. A user might
click several times on the drawgrid and may only hear one sound instead of several different sounds. I don't want the user to wait for a sound to end before he can click again.
So essentially how do I keep the sounds in memory for faster playing and how can I play more than one sound at once or stop the previous sound and play an new one ?