制作LRC歌词系统(7)
发布时间:2021-06-05
发布时间:2021-06-05
char buf[128];
MCI_OPEN_PARMS mciOpen; MCIERROR mciError;
mciOpen.lpstrElementName=(LPCTSTR)s;//取得文件名
mciError=mciSendCommand(NULL,MCI_OPEN,MCI_OPEN_ELEMENT,(DWORD)(LPVOID)&mciOpen);//打开文件
if(mciError) //出错处理 {
mciGetErrorString(mciError,buf,128); printf("%s\n",buf); getchar(); }
m_wDeviceID=mciOpen.wDeviceID; MCI_PLAY_PARMS mciPlay; mciPlay.dwFrom=0;
mciError=mciSendCommand(m_wDeviceID,MCI_PLAY,MCI_FROM,(DWORD)(LPVOID)&mciPlay);
if(mciError) {
mciGetErrorString(mciError,buf,128); printf("%s\n",buf); getchar(); } }
void mcistop() {
char buf[128]; MCIERROR mciError; if(m_wDeviceID) {
MCI_GENERIC_PARMS gp; gp.dwCallback=NULL;
mciError=mciSendCommand(m_wDeviceID,