Archive: music


music
i have seen a lot of toppics about it but still cant make out how to get background music from the beginning till the end (loop) of the setup plz help me i am cient of a noov at this.


See Contrib\BgImage plugin for playing wav files during installation.

-Stu


See attachment. This works on my comps. Or use PlaySound call in async mode. Or bassmod plug-in (mainly for mp3).


how remove (so that nobody sees it) that player (extra little app) when using sound.nsi?


oke i already fixed that but now i have 1 more problem. How can i let the music repeat it self.


plz help


BgImage has a flag for repeating (/LOOP), you can use that.


There are 2 messages to MCI window in sound.nsi script

SendMessage $R0 0x0806 0 0
SendMessage $R0 0x0472 0 1

MSDN:
#define MCI_PLAY 0x0806
#define MCIWNDM_SETREPEAT (WM_USER + 114)
#define WM_USER 0x0400

Second message must set repeat state, but I could not reproduce this now. I'll try to undestand problem tonight.

Edit:
http://alpha.ttt.bme.hu/pub/video/vfwsdk/inc/mciwnd.h
#define MCIWNDM_SETREPEAT (WM_USER + 14)

What number is correct? +14 not works too.


I still have not success with MCI - no repeat, but it plays on Win98 all files: wav, wma, mp3. PlaySound() plays & repeats wav files, but hangs on wma. On later Win versions PlaySoun may work with all files, test if you want attached file.


MCI back door - string commands support :)
"play repeat"
See attached file.


Latest the greatest :)
Music termination added at the and of installation (optional) and some comments.
MCI, PlaySound and MusicBanner samples - see attachment.
Please note, what MSDN says about PlaySound:
file must "be playable by an installed waveform-audio device driver" Other words you can use PlaySound for wav (or midi ?) files.


BgImage::Sound /LOOP /WAIT WAV_FILE_DIR\wav.wav

remember the file must be on the hard drive for this way of useing this


Important the file you use MUST be in WAV format correct me if im wrong

/LOOP causes the file to be repeated
/WAIT will wait till the file ends till the install will continue
you can not inclde both of the 2 commands or the install will never finish

if you want the music to be in the install file but not accessable to anyone i would use this

ReserveFile WAV_FILE_DIR\wav.wav
Function .onInit
BgImage::Sound /LOOP wav.wav
FunctionEnd

you will want to put the reservefile commad as high up in the script as possible because it will speed up the load process


any plans for BgImage to stream mp3's from a remote server in the future
would be fantastic
g


WAV is awful big, try smaller -> BASS

http://forums.winamp.com/showthread....highlight=bass