AndroidMic
AndroidMic copied to clipboard
Automatic audio resampling
Right now the RustApp has an issue that it fails to start when the audio settings are not supported by the device. And sometimes the audio settings supported by the PC are not the same as the ones supported on Android phone.
microphone device -> android settings audio -> network -> rustapp audio settings audio -> audio output device
To address this issue, it's best to add an automatic resampler layer on the RustApp:
microphone device -> android settings audio -> network -> automatic resample -> rustapp audio settings audio -> audio output device
Three things to auto convert:
- sample rate
- channel count
- audio data type
Resample procedure:
- convert data type to f32
- convert channel count to 1
- resample
- convert data type to output type, with corresponding channel count