2011-05-11 45 views

回答

1

試試這個。

- 記錄代碼

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(); 

- 玩代碼

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

我想你已經給了我錄音的代碼.......我期待錄音.... – 2011-05-11 09:11:41