PDA

View Full Version : problem with ISOUND_GetVolume


cradcliff
04-08-2002, 04:15 PM
Has anyone seen any problems with ISOUND_GetVolume? In my callback, regardless of what the sound volume on the device is, the dwparam always contains the same number. I am printing this out as well as AEE_MAX_VOLUME and the volume returned back is ALWAYS larger than the MAX Volume.

This is not making any sense...

Here's the code in case it makes any diff....



soundInfo = (AEESoundInfo*) MALLOC(sizeof(AEESoundInfo));
soundInfo->eDevice = AEE_SOUND_DEVICE_HANDSET;
soundInfo->eMethod = AEE_SOUND_METHOD_BEEP;

if(pme->iSound)
{
ISOUND_Set(pme->iSound, soundInfo);
ISOUND_SetDevice(pme->iSound);
ISOUND_RegisterNotify(pme->iSound, (PFNSOUNDSTATUS) SoundCallback, (void*) pme);
ISOUND_GetVolume(pme->iSound);
}

In the callback, the dwparam is something like 2069 on the Sharp phone....

cradcliff
04-08-2002, 04:45 PM
I figured this out. The documentation says that "The dwParam of the callback function contains volume". This is not true. The dwParam of the callback function contains a pointer to a AEESoundCmdData struct that contains the volume.

cradcliff
04-08-2002, 04:46 PM
Or rather.... dwParam IS a pointer. You do this in your callback:

AEESoundCmdData * pData = (AEESoundCmdData *) dwParam;