One thing to add. I did some tests and found it behaves on different SDK levels.
Is your test device pre-Android 10? If yes, you couldĀ run into the behavior as mentioned inĀ
behaviorĀ "Pre-Android 10 behavior". Then you can try on newer SDK devices.
```
One more change was added in Android 9: only apps running in the foreground (or a foreground service) could capture the audio input. When an app without a foreground service or foreground UI component started to capture, the app continued running but received silence, even if it was the only app capturing audio at the time.
```
Although the doc ofĀ
behaviorĀ doesn't mention the behaviorĀ
"within the same applicationĀ onĀ Android 10+", my test result showsĀ that two
AudioRecords instances can receive audioĀ data simultaneously. (Ps. CameraX VideoCapture and MediaRecorder both useĀ AudioRecord under the hook.) Even if two AudioRecords have different
AudioSource,
sample rate,
encodingĀ settings and running on different processes.