I currently can only playback my background sound from having my wave file next to my compiled exe. But I actually want to have a single static executable with the wave file inside. Is this possible in Delphi XE2?
This is my code:
SndPlaySound('.\Raw.wav', SND_ASYNC or SND_LOOP);
#This will play the Raw.wav that is next to my program.
If you use
PlaySound()instead ofsndPlaySound(), you can utilize theSND_RESOURCEflag to play the wave sound directly from its resource without having to load it into memory first.