制作LRC歌词系统(6)
发布时间:2021-06-05
发布时间:2021-06-05
m_wDeviceID=mciOpen.wDeviceID;
mciStatusParms.dwItem=MCI_STATUS_LENGTH;
mciSendCommand(m_wDeviceID,MCI_STATUS,MCI_WAIT|MCI_STATUS_ITEM,(DWORD)(LPVOID)&mciStatusParms);//关键,取得长度
m_dLength=mciStatusParms.dwReturn;
mciSendCommand(m_wDeviceID,MCI_CLOSE,0,NULL);//关闭文件 return m_dLength; }
void converttime(char mmssmm[],long time) {
char buf[1];
int temp=(int)(time%1000); itoa(temp/100,buf,10); mmssmm[7]=buf[0];
itoa((temp-temp/100*100)/10,buf,10); mmssmm[8]=buf[0]; temp=(int)(time/1000); itoa(temp%60/10,buf,10); mmssmm[4]=buf[0];
itoa(temp%60%10,buf,10); mmssmm[5]=buf[0];
itoa(temp/60/10,buf,10); mmssmm[1]=buf[0];
itoa(temp/60%10,buf,10); mmssmm[2]=buf[0]; mmssmm[0]='['; mmssmm[3]=':'; mmssmm[6]='.'; mmssmm[9]=']'; }
void mciplay(char*s) {
//int m_wDeviceID;