| View previous topic :: View next topic |
| Author |
Message |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Mon Sep 27, 2010 3:12 pm Post subject: Using a WAV file as a resource |
|
|
Hi All
I'm trying to use an XP sound as the clicker in my roulette program.
I want to compile it into the .exe so that I know it will work on non XP
systems but I'm confused about the binfile syntax. What do I use as
the resource id when I save the resource to the drive as a WAV file?
Here are the code fragments I'm trying to use.
| Code: |
#resource add,binary,C:\WINDOWS\Media\Window XP Start.wav
...
binfile saveres,binary,????,C:\roulette\Click.wav
...
rem play the WAV as the ball rolls round
play C:\roulette\Click.wav,wait
|
Thanks
David.M |
|
| Back to top |
|
 |
bornsoft Contributor

Joined: 19 Feb 2009 Posts: 113 Location: Germany
|
Posted: Mon Sep 27, 2010 5:02 pm Post subject: |
|
|
Hi,
do it the following:
First add:
| Code: |
#RESOURCE ADD,BINARY,"C:\WINDOWS\Media\Window XP Start.wav",SOUND_1
|
Then do:
| Code: |
write RESOURCE,BINARY,SOUND_1,@path(%0)StartSound.wav
|
Hope this helps.
bornSoft
Edit: Oh, that was the VDS6 syntax. With VDS5 the second line would be:
| Code: |
BINFILE SAVERES,BINARY,SOUND_1,@path(%0)StartSound.wav
|
|
|
| Back to top |
|
 |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Mon Oct 04, 2010 8:26 am Post subject: |
|
|
Thanks for the help. I followed your VDS5 syntax and it worked first time.
Thanks again
David.M
P.S. Now I can lose my shirt at roulette against my kids!! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|