NSIS循环播放MP3
Function .onInit
InitPluginsDir
File "/oname=$PLUGINSDIR\bgm_傻女.mp3" "E:\傻女.mp3"
; 打开音乐文件
System::Call "winmm.dll::mciSendString(t 'OPEN $PLUGINSDIR\bgm_傻女.mp3 TYPE MPEGVIDEO ALIAS BGMUSIC', t .r0, i 130, i 0)"
; 开始播放音乐文件
System::Call "winmm.dll::mciSendString(t 'PLAY BGMUSIC NOTIFY', t .r0, i 130, i 0)"
FunctionEnd
Function .onGUIEnd
; 停止播放音乐文件
System::Call "winmm.dll::mciSendString(t 'STOP BGMUSIC',t .r0,i 130,i 0)"
; 关闭音乐文件
System::Call "winmm.dll::mciSendString(t 'CLOSE BGMUSIC',t .r0,i 130,i 0)"
FunctionEnd