The Dink Network

Reply to Re: Playing a sound

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 2nd 2006, 01:32 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
From the DinkC reference:
playsound(int sound_number, int min_speed, int rand_speed_to_add, int active_sprite, bool repeat);

Now the first thing you need to check is the number of the sound. To do so check START.c. All the sounds are loaded there.
Now I don't see "pighurt" so that probably means it's a file you added yourself. In that case you have to load it in START.c first. You need to give each sound a unique number there. Just add load_sound("pighurt.WAV",50); or something like that. The second thing you need to know is the playspeed. (according to the DinkC reference typical values are 16000 and 22050 Hz).
This means that your typical playsound(); command will look like:

playsound(50,22050,0,0,0);