Moto G呼叫录音问题

时间:2015-06-14 19:28:51

标签: android audio-recording

我在通话录音示例中有以下片段。

        recorder = new MediaRecorder();
//      recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);

        recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
        recorder.setAudioSamplingRate(44100);
        recorder.setAudioEncodingBitRate(96000);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
        //recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
        //recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        recorder.setOutputFile(audiofile.getAbsolutePath());
        try {
            recorder.prepare();
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        recorder.start();

在Moto G 1st Gen Lollipop 5.0.2上,我无法听到传入的声音。

你能帮我解决这个问题吗?

0 个答案:

没有答案