java me: start playing mp3 file from the 2nd minute and stop on the fourth minute. mp3 file is of 6 minutes
i need to start playing a local r开发者_如何学Cesource mp3 file from the 2nd minute and stop on the fourth minute. mp3 file is of 6 minutes.
im new to this and couldn't find an example for the below code, could some1 pls point me to something like below?
long setMediaTime(long now)
i have other files also which i want to do the same with different numbers, it would be best if i could do this in milliseconds.. i am using this code to play the file..
{
try
{
InputStream is = getClass().getResourceAsStream("/nn.mp3");
Player p = Manager.createPlayer(is,"audio/mpeg");
p.realize();
{
}
p.prefetch();
p.start();
}
catch(Exception e)
{}
}
thanking u in advance! :)
You can use this p.setLoopCount( );
method.
Just have a look here
精彩评论