在Android上记录音频的MediaPlayer源? [英] Record audio on Android with MediaPlayer as source?
问题描述
在Android上,你可以记录使用的MediaRecorder类麦克风音频: MediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
On Android, you can record audio from the microphone using the MediaRecorder class: MediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
我想记录所起一个的MediaPlayer实例,而不是(或一些其他音频回放装置)的音频的某些部分。那可能吗?我将如何设置自定义音频源?
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?
要总结; 如何流音频到MediaRecorder从任意音源?
推荐答案
我不认为这是对于一个API现在。虽然它是可能的话,你就必须有访问设备的缓冲区,下至内核/硬件水平。即使你找到一个方式,我不认为Android会容许你这样做的应用水平。
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.
这篇关于在Android上记录音频的MediaPlayer源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!