我想从我的应用程序播放音频。使用以下代码
try{
Player p = javax.microedition.media.Manager.createPlayer("file:///store/home/user/recording.amr");
p.realize();
VolumeControl volume = (VolumeControl) p.getControl("VolumeControl");
volume.setLevel(30);
p.prefetch();
p.start();
}catch(MediaException me)
{
Dialog.alert(me.toString());
}
catch(IOException ioe)
{
Dialog.alert(ioe.toString());
}
然后我得到一个异常 net.rim.device.internal.media.rimmediaexception : Media unloded while initializing
关于这个异常(exception)的任何想法?
最佳答案
阅读轮辋文章:http://docs.blackberry.com/en/developers/deliverables/11941/BlackBerry_Java_Application-Development_Guide--741609-1109114520-001-5.0_Beta-US.pdf
请参阅堆栈 overwr 流链接 Radio Streaming in Blackberry
关于audio - 从黑莓应用程序播放音频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7609154/