Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Elston
Beginner
59 Views

Automatic gain control

Can anyone explain the parameters to theippsALCSetGain_G169_16s andippsALCSetLevel_G169_16s API's. As far as I understand, the former sets the maximum gain value and the later sets the target gain value along with clipping levels. I dont know what clipping levels is though.
Is it possible to call the above API's to change the gain at runtime? Will there be any side effects?
Thanks
Elston
0 Kudos
1 Reply
Ying_H_Intel
Employee
59 Views

Hi Elston,

Here is some information for your reference

Let me explain the clipping level, target level first.

ippsALCInit_G169_16s(pALCState) set
0 dBm0 - clipping level,-26.1 dBm0 - target level, and 11.6 dB - maximum gain level
as default value
We can Use ippsALCSetLevel and ippsALCSetGain_G169 to change the default value.

A value in dBm0 here is reffered to the linear PCM max level (0 dBm0), so the ALC target and clipping level are always negative (normally real signal is some less than max level).
Please note, that parameters value in ippsALCSetLevel_G169_16s function must be given with sign dropped.

IppStatus ippsALCSetLevel_G169_16s(Ipp32f targetLevel, Ipp32f clipLevel,IppsALCState_G169_16s* pALCMem);
targetLevel Automatic level control target level in dBm0 after dropping the sign.
cliptLevel Automatic level control clipping level in dBm0 after dropping the sign.

So for example ippsALCSetLevel_G169_16s(6.f, 6.f, pALCMem)designates -6 dBm0 both for the target and clipping levels.
ALC does amplify a signal maximally when both target level and clipping levels 0 dBm0, but anyway not bigger than 11.6 dB.
The lower target level the lower level of ALC output signal. For example -60 dBm0 (60.f parameter on Set function) will make a signal hardly to hear, yet hearable (level of laptop fan noise).

So for your question
1) If you want to bump up or lower the volume ofthe audio. You can use SetGain and SetLevel to change the default level. Once they are determined. You can call ippsALC_G169_16s repeatedly for more audo. as the exampleUSC ALC filter in IPP sample.

2) not sure why you need change the gain at runtime. But if you want , yes, you mayreset the level and gains. thenperformippsALC_G169_16s on your targetedsignal.

Best Regards,
Ying

Reply