2010-03-15 32 views
1

我想錄制音頻Android的 - 錄音機FileNotFound

this.recorder = new android.media.MediaRecorder(); 
this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC);  this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT); 
this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT); 
this.recorder.setOutputFile("pruebaAudioRecorder.mp4"); 
**this.recorder.prepare();** 
this.recorder.start(); 

但是當我準備調用方法拋出FileNotFound異常。

  • 我應該在準備方法之前創建文件嗎?像new File(...)
  • 如果是這樣,哪個應該是文件路徑?

thx很多。

回答