Android 中的多声道音频录制

Multichannel Audio recording in Android

我有一个多通道 microphone 通过 USB 连接到 android phone(像素 3)。我正在尝试使用 MediaRecorder API for recording audio. However, there doesn't seem to be a way to setup multichannel recording with MediaRecorder even though Android USB audio documentation seems to say it allows multichannel input. I know recording multi channel audio is possible, as there are apps that already do that (see ntrack). I'm trying to figure out how to do this and hoping it doesn't involve writing usb driver (like these developers).

如果您可以使用 audioService.getDevices(AudioManager.GET_DEVICES_INPUTS) 将麦克风视为单独的输入设备,那么您可以使用 AAudio API(最好使用 Oboe 库)通过打开来访问这些麦克风中的每一个每个流。