Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

On Android, you can record audio from the microphone using the MediaRecorder class: MediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);

I want to record some parts of audio being played by a MediaPlayer instance instead (or some other audio playback device). Is that possible? How would I set a custom audio source?

To summarize; how do I stream audio into the MediaRecorder from an arbitrary audio source?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
185 views
Welcome To Ask or Share your Answers For Others

1 Answer

I don't think there is an API for that for now. Though it IS possible, you would have to have access to the device's buffer, down to the kernel/hardware level. Even if you find a way, I don't think Android would give you permission to do this on application level.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...