Sound is played several times, but suddenly stop playing.
See this problem: Everytime the player sprite catches an item on game, this sound is played. It works well, but after 14 or 13 times, the sound doesn't play anymore and the only thing I've got is this exception message:
javax.microedition.media.MediaException: audio device
Now the code is called when it must play the sound:
try{
InputStream is = getClass().getResourceAsStream("beep.wav");
Player sound = Manager.createPlayer(is,"audio/x-wav");
sound.realize();
sound.prefetch();
sound.start();
}
catch(Exception e){
System.out.println(e);
}
What's going on here?
Thanks for your reply!

