Thread: Jackpot game
View Single Post
Old May 26th, 2005, 9:35 AM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Does your program already play the sound files?

If it doesn't, the normal way of playing sounds requires that the wav/mp3/whatever files exist on disk with the application (.exe), which are then played. This can be done in various ways using native, DirectX or driver APIs or using COM elements, depending on the quality, speed and latency required.

As for embedding (sound) files directly into a compiled program (so that only the .exe needs to be distributed), this can be done in a number of ways, but the simplest is using a Resource Script:
http://programmingforums.org/forum/s...ad.php?p=14735

You'd need to have a startup routine that extracts the files, and possibly a cleanup routine to delete them afterwards.
Rory is offline   Reply With Quote