开发者

voice recording and play programatically in blackberry

Is it possible in blackberry to record voice and play it programatically. Please give me some idea the how can we achiev开发者_高级运维e this. Any reference link too if possible.

Thanks in advance.


Try this.

- Record Code

Player player = Manager.createPlayer("capture://audio?encoding=amr");

RecordControl recorder = (RecordControl)player.getControl("RecordControl");

recorder.setRecordLocation("file:///SDCard/BlackBerry/Music/recordingFile.amr");

recorder.startRecord();

player.start();

Thread.sleep(5000);

recorder.commit();

player.close();

- Play Code

Player music = Manager.createPlayer("file:///SDCard/BlackBerry/Music/Musicfile.mp3");
music.realize();
music.start();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜