开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜