[Feat]: Set AudioRecord setPreferredDevice
Version
2.6.1
Environment that reproduces the issue
Redmi Note 9 Pro - Android 12
Use case description
Hi. How can I optionally set up audio sources for livestream: device microphone, bluetooth microphone, usb microphone,... ?
Proposed solution
No response
Alternative solutions
No response
Hi there,
I am working in v3 where setting the audio source is possible. Unfortunately, I don't plan to add new audio source yet (I am just implementing the possibility to set a new audio source).
For my experience, BT microphone is always a bad idea because of the latency (unless there is low latency BT now).
Hi there,
I am working in v3 where setting the audio source is possible. Unfortunately, I don't plan to add new audio source yet (I am just implementing the possibility to set a new audio source).
For my experience, BT microphone is always a bad idea because of the latency (unless there is low latency BT now).
Hi,
Yes, I just need the ability to set the audio source as AudioDeviceInfo of AudioRecord class.
Maybe something like this:
public boolean setPreferredDevice(AudioDeviceInfo deviceInfo)
In the current version (2.6.1), can I add/modify code to do that? Thanks.
You can modify directly in the dev_v3 branch.
With v3, there is internal and public interfaces for most of the components (incl. source). So you will have to add an API to the public IAudioRecordSource interface and implements it in AudioRecordSource.
Somehow, you have to make sure audio config (sample rates, byte format,...) is valid with current configuration.
Thank you very much. I will check it out.
Have you made progress? You can made a PR when the dev is done 👍