我想用MediaRecorder Class在android中捕捉音樂。用MediaRecorder捕捉音樂
這是我的代碼:
public void start_recording()
{
myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);
myAudioRecorder.setOutputFile(outputFile);
myAudioRecorder.prepare();
myAudioRecorder.start();
}
你似乎缺少一個實際問題 –