Hi sir,
i am vinay, i want to play any audio file which is given by me...could u please help me ...
1. How can i add my audio file to my application
2. Is there any base code for this to help me....
i have this code...my audio file name is "ring.MP3"
public void run()
{
try
{
InputStream is = getClass().getResourceAsStream("/ring.mp3");
player = Manager.createPlayer(is,"audio/mpeg");
player.realize();
// get volume control for player and set volume to max
vc = (VolumeControl) player.getControl("VolumeControl");
if(vc != null)
{
vc.setLevel(100);
}
player.prefetch();
player.start();
}
catch(Exception e)
{}
}
how should i give the path....
please help....

Reply With Quote




