forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Using a WAV file as a resource

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Mon Sep 27, 2010 3:12 pm    Post subject: Using a WAV file as a resource Reply with quote

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
View user's profile Send private message
bornsoft
Contributor
Contributor


Joined: 19 Feb 2009
Posts: 113
Location: Germany

PostPosted: Mon Sep 27, 2010 5:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Mon Oct 04, 2010 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group