我正在尝试播放录制的波形文件。播放时,以下语句抛出异常:
Player player = Manager.createPlayer(is, "audio/mpeg");
我播放波形文件的整个代码如下:
if (types[cnt].equals("audio/x-wav")) {
Class clazz = Class.forName("RecordAudio");
InputStream is =
clazz.getResourceAsStream("file:///SDCard/BlackBerry/original.wav");
//create an instance of the player from the InputStream
Player player = Manager.createPlayer(is, "audio/mpeg");
player.realize();
player.prefetch();
//start the player
player.start();
}
可能是什么问题呢?