问题描述
我对编译创建一个AudioRecord对象,抓住我的平板电脑的麦克风输入库。
I am compiling against a library that creates an AudioRecord object that captures the microphone input of my tablet.
我没有修改precompiled库的能力,但我想给它一些pre-录制音频。
I don't have the ability to modify the precompiled library, but I want to feed it some pre-recorded audio.
有没有一种方法来建立某种形式的环回功能的Android做到这一点?
Is there a way to create some sort of loopback in android to accomplish this?
感谢。
推荐答案
Android不(在写作的时候)支持此功能。你作为一个应用程序开发人员无法与一些其它音源更换麦克风路径。
Android does not (at the time of writing) support this functionality. You as an app developer can't replace the microphone path with some other audio source.
一些平台都支持这种功能。举例来说,我已经通过连接的多媒体
讲台给一个做音频的高通APQ8064平台的环回的 AFE_PCM_RX
音频混合器,和 AFE_PCM_TX
DAI到多媒体
音频混合器,然后从读 AFE_PCM_TX
设备。但是,这显然是非常特定于平台的,它需要你有一个根深蒂固的设备(也可能获得完整的源代码code的设备,这样就可以使一个自定义ROM),以及该平台的一个很好的理解问题。
。TL; DR:它通常不值得努力尝试这种
Some platforms do support this kind of functionality. For example, I've done loopback of audio on Qualcomm's APQ8064 platform by connecting one of the MultiMedia
DAIs to the AFE_PCM_RX
audio mixer, and the AFE_PCM_TX
DAI to the MultiMedia
audio mixer, and then reading from the AFE_PCM_TX
device. But this is obviously very platform-specific, it requires you to have a rooted device (and possibly access to the full source code for the device so that you can make a custom ROM), and a good understanding of the platform in question.
TL;DR: it's generally not worth the effort to attempt this.
这篇关于Android的音频回传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!