Skip to content
⌘ NSIS Forum Archive

Music Loop

10 posts

BlasterUK#

Music Loop

Hey all,

This is my code used for background music:
InitPluginsDir
SetOutPath $PLUGINSDIR
File "${SND_NAME}"
System::Call 'msvfw32.dll::MCIWndCreate(i 0, i 0,i 0x0000, t "$PLUGINSDIR\${SND_NAME}") i .R0'
SendMessage $R0 0x0806 0 0
SendMessage $R0 0x0872 0 1
How do i make the song loop? its not long enough for the install process. Any way i can loop it?

Thanks
Simon
BlasterUK#
ok its in wav format now. Its in the root dir to the .nsi file, can someone post up the code i need to add? i cant get it working.
Comm@nder21#

Section blabla
SetOutPath $PLUGINSDIR
File music.wav
BgImage::Sound /LOOP "$PLUGINSDIR\music.wav"

[...]

BgImage::Sound /STOP
Delete "$PLUGINSDIR\music.wav"
SectionEnd
kichik#
You must use /NOUNLOAD with BgImage::Sound or it'd simply unload the plug-in and stop the music right after it returns.