Cell Call Volume

This forum contains short topics that require short answers. Developers arround the world are welcomed to help the community, or to post their own questions.
[C++ development]

Moderators: Teksoft, admin

Cell Call Volume

Postby temp123 » Mon Apr 16, 2007 12:48 pm

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
temp123
TEK-Seeker
 
Posts: 37
Joined: Mon Jul 24, 2006 9:21 pm

Postby temp123 » Tue Apr 17, 2007 6:18 am

Hi,

I got the answer for the same, used the same API RIL_SetAudioGain

Thanks,
temp123
temp123
TEK-Seeker
 
Posts: 37
Joined: Mon Jul 24, 2006 9:21 pm

Postby radhoo » Wed Apr 18, 2007 12:46 pm

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
TEK-Insider
 
Posts: 640
Joined: Fri Mar 17, 2006 2:47 am

Postby temp123 » Thu Apr 19, 2007 8:39 am

Hi Radu,

Used a similar function to set the values. thanks for the information.

Regards,
temp123
temp123
TEK-Seeker
 
Posts: 37
Joined: Mon Jul 24, 2006 9:21 pm


Return to Pocketpc

Who is online

Users browsing this forum: No registered users and 0 guests