[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to embedded file/sound into executable?


  

Hello,

In an program of mine, I wish to play a sound to advise the
user, someting like a bell, "din din!".
Actually i have a file
din-din.wav and i play as follow:

if condition = true then
 if
Exist("/home/user/din-din.wav") then
 exec["aplay",
"/home/user/din-din.wav"]
 endif
endif

now my worry is that for some
reason din-din.wav file get damaged, deleted, ecc,
so it means that my
application will became silent and enduser will be no more advised by
sound
when condition became true.

QUESTION: Is possible to "embedded"
the din-din.wav file inside the executable when i compile
the project
and play it when needed? this will make the wav file part of the
executable, so it will be always available.

Thanks,
Roberto
 


Follow-Ups:
Re: How to embedded file/sound into executable?T Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: How to embedded file/sound into executable?Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>