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.