
Originally Posted by
haaris_86
The audio is playing bt the other event handling things of the application have stopped working. Also the audio doesn't stop till the entire clip gets over.
reply soon,
thanks in advance..
Hello,
I suspect that,you are starting/playing the sound file in the recursive loop,on a thread.is it so?
Again kindly let us know the file size that you are trying to play.
For your reference, I am sharing with you one code segment, please make sure that you have start the player once.
Code:
public void startPlayer(){
try
{
InputStream is = getClass().getResourceAsStream("file.wav");
Player p = Manager.createPlayer(is, "audio/X-wav");
p.start();
}
catch (IOException ioe) { }
catch (MediaException me) { }
}
please check this code,call this method just once,can check this by putting the sop's in this method.