android - 将音频(麦克风)输入共享到 Android 中的多个应用程序

标签 android audio oboe

根据官方documentation

Android 10 (API level 29) and higher imposes a priority scheme that can switch the input audio stream between apps while they are running. In most cases, if a new app acquires the audio input, the previously capturing app continues to run but receives silence. In some cases, the system can continue to deliver audio to both apps. The various sharing scenarios are explained below.


除了一些 special cases , 音频不会在应用程序之间共享。
但我见过许多应用程序共享音频输入,而不是上述特殊情况。
例如。 Zoom ,当我在缩放通话并启动录音机时,虽然缩放音频强度降低,但这两个应用程序都在获取音频。
同样,Omlet arcade即使将麦克风访问权限授予其他应用程序,也能够录制麦克风音频。
这怎么可能?根据文档,这是不允许的。
更新:
能够使用 Oboe 来实现它.但并非在所有设备上都一致。这也会导致我的直播应用程序出现同步问题。音频延迟可听

最佳答案

这在 Android 5+ 中是不可能的。您需要有根电话才能执行此操作。在 Omlet Arcade 中 每当您玩游戏并打开游戏内麦克风时,Omlet Arcade 将停止接收任何音频输入。但是,Omlet Arcade 仍然可以运行,但您必须重新启动它才能恢复语音输入。
不过,在最近的 MIUI 错误中,人们能够在 Zoom 和游戏内麦克风应用程序上收听电话。在您的情况下,它可能不是官方的 Android 和像 MIUI 和 OxygenOS 这样的编辑过的 Android

关于android - 将音频(麦克风)输入共享到 Android 中的多个应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63574144/

相关文章:

android - 服务在后台运行?

c++ - 如何从WAV文件中获取采样率?

用于音频处理的 Java 实用吗?

javascript - 我一次可以播放多少个 HTML 音频元素?

android - 如何改变音调?

android - 获取应用播放音频的详细信息

java - 如何在 android 中允许对 WebView 的照片库权限?

android - Firebase 断开连接回调

android - 隐藏youtubeview的视频仅播放音频