我MediaRecorder
用于在android中录制通话。但我只想记录来电者的声音。这可以做到吗?
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
// mRecorder.setOutputFile("/sdcard/yousuck2.3gp");
if (audiofile == null) {
File sampleDir = Environment.getExternalStorageDirectory();
try {
audiofile = File.createTempFile("ibm", ".3gp", sampleDir);
} catch (IOException e) {
Log.e(TAG, "sdcard access error");
return;
}
}
还有和VOICE_CALL
之间有什么区别?我阅读了 Android 文档,但无法理解。VOICE_UPLINK
VOICE_DOWNLINK