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

Developer

Forums

Forums:

Hi ,

I tried to play a Mp3 file .But after running the simultor crashes.My code is follows,
There is no compilation error.
PFNMEDIANOTIFY MediaNotify;
AEEMediaData md;
boolean nRet;
ISHELL_CreateInstance((pApp->a.m_pIShell),AEECLSID_MEDIAMP3,(pApp->pIMedia));
md.clsData = MMD_FILE_NAME;//AEECLSID_MEDIAMP3;
md.pData = "/lo.mp3";
md.dwSize = 0;
AEEMediaUtil_CreateMedia(pApp->a.m_pIShell, &md,&(pApp->pIMedia));
int ret=IMEDIA_SetMediaData(pApp->pIMedia,&md);
IMEDIA_RegisterNotify(pApp->pIMedia, MediaNotify, pApp);
IMEDIA_SetVolume(pApp->pIMedia, AEE_MAX_VOLUME );
IMEDIA_Play(pApp->pIMedia);

Is there is any mistake in this code.Plz help me.

Thanks in advance,
Premlal

I'm guessing that your call to IMEDIAUTIL_CreateMedia is failing, which means the next instruction you execute will dereference a NULL pointer. But since this fails in the Simulator, you should probably try debugging it to see where the crash occurs.

I'm guessing that your call to IMEDIAUTIL_CreateMedia is failing, which means the next instruction you execute will dereference a NULL pointer. But since this fails in the Simulator, you should probably try debugging it to see where the crash occurs.

Did you tried removing this line.
AEEMediaUtil_CreateMedia(pApp->a.m_pIShell, &md,&(pApp->pIMedia));

Did you tried removing this line.
AEEMediaUtil_CreateMedia(pApp->a.m_pIShell, &md,&(pApp->pIMedia));

Yes I tried wit removing that line.But the result is same.Is there is any other problem ?help :o

Yes I tried wit removing that line.But the result is same.Is there is any other problem ?help :o