test结构体中的变量:IMedia * pIMedia;
AEEMediaData date;
int count;
//代码实现
switch (eCode)
{
// App is told it is starting up
case EVT_APP_START:
if(SUCCESS != ISHELL_CreateInstance(pMe>a.m_pIShell,AEECLSID_MEDIAMIDI,(void **)&pMe->pIMedia) )
return FALSE;
pMe->date.clsData = MMD_FILE_NAME;
pMe->date.pData = "B.mid";
pMe->date.dwSize = 0;
if(SUCCESS != IMEDIA_SetMediaData(pMe->pIMedia,&(pMe->date) ) )
return FALSE;
if(SUCCESS !=IMEDIA_RegisterNotify(pMe->pIMedia,
(PFNMEDIANOTIFY)CPlayerWin_MediaNotify,
pMe) )
return FALSE;
pMe->count = IMEDIA_Play(pMe->pIMedia);//跟踪代码pMe->count为1,这是为什么?
return(TRUE);
/////////////////////////////////////////////////////////////////////////////
回调函数的实现:
static void CPlayerWin_MediaNotify(void * pUser,AEEMediaCmdNotify * pCmdNotify)
{
IMEDIA_Play(pCmdNotify->pIMedia);
}
//这里的回调函数该怎么写?我想实现的功能只是播放B.mid文件,至于控制播放这里不实现,跪求高手指导!
------解决方案--------------------------------------------------------
出错信息可能就需要在回调里处理了
------解决方案--------------------------------------------------------
BREW SDK 中有mediaplayer的例子呀?!