Hi,
I want to change the volume level for an active cellular call. I didnt find any Telephony API relevant to this, so I switched to RIL. In RIL we have an API RIL_SetAudioGain which sets the RX and TX parameters of the call which says that value of 0 to 128 for nominal and automatic.
I have used the above API and successfully changed the volume. But my problem is I am able to either set the maximum value or I can set minimum value. I am not able to set the intermediate values. Can anyone let me know the different interpretation for values ranging from 0 to 128.
Also, If I change the volume from the default bar that appears, and query using RIL_GetAudioGain, I get values like, 0x0000, 0x3333,0x6666 ...0xffff.
With Regards,
Temp123
- It is currently Mon May 20, 2013 1:31 am • All times are UTC + 2 hours
Cell Call Volume
4 posts
• Page 1 of 1
Here is sample on how to scale the values. Use the code below, with values from 0 (minimum) to 5 (maximum):
- Code: Select all
DWORD ScaleValue(int nVol)
{
switch (nVol)
{
case 0: return 0;
case 1: return 0x33333333;
case 2: return 0x66666666;
case 3: return 0x99999999;
case 4: return 0xcccccccc;
case 5: return 0xffffffff;
default: return 0;
}
}
- radhoo
- TEK-Insider

- Posts: 640
- Joined: Fri Mar 17, 2006 2:47 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests