PlaySound同时播放两wav
答案:1 悬赏:30 手机版
解决时间 2021-12-16 13:19
- 提问者网友:傲气白痴
- 2021-12-16 09:06
能不能用PlaySound同时播放两个WAV文件?如果能,怎么弄? 谢谢了!
最佳答案
- 五星知识达人网友:茶丸软卷
- 2021-12-16 10:18
mciSendCommand函数可以同时播放两个音乐 MCIDEVICEID dev[20]; MCI_OPEN_PARMS mciOpen; MCI_PLAY_PARMS mciPlay; { mciOpen.lpstrElementName="./music/1.mp3"; if(mciSendCommand(NULL,MCI_OPEN, MCI_OPEN_ELEMENT , (DWORD)&mciOpen)==0) dev[0]=mciOpen.wDeviceID; else mciOpen.wDeviceID=dev[0]; mciPlay.dwFrom = 0; mciSendCommand(mciOpen.wDeviceID,MCI_PLAY,MCI_NOTIFY | MCI_FROM,(DWORD)&mciPlay); } { mciOpen.lpstrElementName="./music/2.mp3"; if(mciSendCommand(NULL,MCI_OPEN, MCI_OPEN_ELEMENT , (DWORD)&mciOpen)==0) dev[1]=mciOpen.wDeviceID; else mciOpen.wDeviceID=dev[1]; mciPlay.dwFrom = 0; mciSendCommand(mciOpen.wDeviceID,MCI_PLAY,MCI_NOTIFY | MCI_FROM,(DWORD)&mciPlay); }
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯