Archive: Music Loop


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

Also, how can i change the font colour? it doesnt show easily on my background image.


If it's a wave file, you can use the BgImage plug-in to play it in a loop.


its wma


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.



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

[...]

BgImage::Sound /STOP
Delete "$PLUGINSDIR\music.wav"
SectionEnd

thx, but i added that after the code for bgimage and it didnt work :(


You must use /NOUNLOAD with BgImage::Sound or it'd simply unload the plug-in and stop the music right after it returns.


SendMessage $R0 0x0465 0 "STR:play repeat"

from this link Play Sound


Thanks All, i'm using the coding from Takhir. Thanks mate.