After days of working, all audio processing functions seems are working in the KdvMediaSDK now, and the next step will be getting a proper set for the audio processing algorithms to run under certain environments & circumstance.
I will start it by beginning with AGC module too. Here are the parameters of AGC algorithm.
1. Target level DBFS
According to the description of webrtc:
Change of this parameter will set the target peak |level| (or envelope) of the AGC in dBFs (decibels from digital full-scale).
The convention is to use positive values.
For instance, passing in a value of 3 corresponds to -3 dBFs, or a target level 3 dB below full-scale.
Value range: limited to [0, 31].
TODO(ajm): use a negative value here instead, if/when VoE will similarly update its interface.
2. Compression gain DB
Sets the maximum |gain| the digital compression stage may apply, in dB. A
higher number corresponds to greater compression, while a value of 0 will leave the signal uncompressed.
Value range: limited to [0, 90]
3. Enable limiter or not
When enabled, the compression stage will hard limit the signal to the target level. Otherwise, the signal will be compressed but not limited above the target level.
4. Analog level limits
Sets the |minimum| and |maximum| analog levels of the audio capture device.
Must be set if and only if an analog mode is used.
Value range: limited to [0, 65535].
5. Stream saturated or not
Returns true if the AGC has detected a saturation event (period where the signal reaches digital full-scale) in the current frame and the analog level cannot be reduced.
This could be used as an indicator to reduce or disable analog mic gain at the audio HAL.
BTW: Not like the webrtc project, products using KdvMediaSDK are using mixing-audio-on-server mode, so “target level Dbfs” and “gain DB” will be more important to us.