Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi All
I`m trying to play mp3 file using ISOUNDPLAYER interface. It works good , but playing only from handset speaker. But my task is required ,that mp3 play from headset speaker.

.........
AEESoundPlayerInfo pInfo;
AEESoundDevice sd;
AEESoundMuteCtl mctl;

pInfo.eInput = SDT_BUFFER;
pInfo.pData = (void *)(pBuf);
pInfo.dwSize = size;

sd=AEE_SOUND_DEVICE_HEADSET;
mctl=AEE_SOUND_MUTECTL_UNMUTED;

if(pMe->pISoundPlayer)
{
ISOUNDPLAYER_Release(pMe->pISoundPlayer);
pMe->pISoundPlayer=NULL;
}

ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_SOUNDPLAYER, (void **)&pMe->pISoundPlayer);
ISOUNDPLAYER_RegisterNotify(pMe->pISoundPlayer,&SoundPlayerCBFn,pMe);

ISOUNDPLAYER_SetSoundDevice(pMe->pISoundPlayer,sd,mctl,mctl);
nRet=ISOUNDPLAYER_SetInfo(pMe->pISoundPlayer,&pInfo);
if (nRet == SUCCESS)
{
pMe->volume=AEE_MAX_VOLUME;
ISOUNDPLAYER_SetVolume(pMe->pISoundPlayer, pMe->volume);
ISOUNDPLAYER_Play(pMe->pISoundPlayer);
}

Call Back of ISOUNDPLAYER_SetSoundDevice is AEE_SOUNDPLAYER_SUCCESS, but not any effect!!! :confused:
What is wrong??