private void record(String path){
this.recorder = new MediaRecorder();
this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC);//音频来源是麦克风
this.recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);//设置格式
this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
this.recorder.setOutputFile(path);
try {
this.recorder.prepare();
} catch (Exception e) {
e.printStackTrace();
}
this.recorder.start();
}