Embedding sound into an executable in C ++
how to save sound in executable file? Suppose I have an x function to play a sound located at C: \ sound, how can I store sound.wav inside an executable? i need to read it byte by byte and write it in some variable, then create the file and play it when the user executes my file?
+3
source to share
1 answer
I would advise hardcoding the .wav content into some variable and then playing its content using 'sndPlaySound' with the 'SND_MEMORY' parameter, like in this example provided by Microsoft: http://support.microsoft.com/kb/133064
+2
source to share