Record audio that is being played from device to headphone jack

I'm looking for a way to combine audio recorded from the device microphone with the sound that the device is playing.

Now you might say that it's an easy task, the microphone can record both BUT that's not the case because the audio that the device is playing is played to the headphone jack instead of the speakers.

Is there any way to do this?


I don't understand what you want. if you are talking about recording input source there are various source android OS provide to you such as MIC, DOWNLINK/Headphone speaker CAMCORDER etc...

Source Sode From android developer site

private void startRecording() {
        mRecorder = new MediaRecorder();
        mRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_DOWNLINK);
        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        mRecorder.setOutputFile(mFileName);
        mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

        try {
            mRecorder.prepare();
        } catch (IOException e) {
            Log.e(LOG_TAG, "prepare() failed");
        }

        mRecorder.start();
    }
链接地址: http://www.djcxy.com/p/33254.html

上一篇: 数据结构在卡片游戏中快速匹配

下一篇: 将设备正在播放的音频录制到耳机插孔