2
어떻게 오디오 파일을 .m4a 형식으로 녹음 할 수 있습니까? 당신이 당신의 예에서 출력 형식을 설정할 경우오디오 파일을 .m4a 형식으로 녹음하려면 어떻게해야합니까?
public void startRecording() throws IOException {
recorder = new MediaRecorder();
path = "/sdcard/pithysongs_" + System.currentTimeMillis() + ".m4a";
String state = android.os.Environment.getExternalStorageState();
if (!state.equals(android.os.Environment.MEDIA_MOUNTED)) {
throw new IOException("SD Card is not mounted. It is " + state
+ ".");
}
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();
}
덕분에 ..
다음