The Dink Network

Cricket sound effect

February 14th 2012, 04:18 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
I need some quality cricket sound effects to add to a night-time scene. Problem is, I don't seem to find the correct kind of sound files. Whenever I'm done adding them to the start.c and try to play, it crashes. Only reason I can think of is that it's the wrong kind of sound file. I tried WAV and MP3, neither worked. Any help?
February 14th 2012, 04:48 PM
wizardg.gif
Paul
Peasant He/Him United States
 
Well, .wav is definitely correct (I forget if any versions of Dink can use MP3 there), but not all .wav files are alike. If possible, try converting it to these settings: 8-bit, Mono, 22kHz, PCM. (The setting used by punch.wav)

I'm sure it doesn't need to be actually that way, but for testing at least, set it as close as possible. You should be able to do this with just the "Sound Recorder" program in Windows if you don't have anything more advanced.
February 14th 2012, 04:53 PM
pillbug.gif
Pillbug
Peasant He/Him United States
Love! True love! 
Yes, they need to be in .wav. Double check that the line of code itself is written correctly, with the file itself named correctly in the sound folder. Other than that, Paul's suggestions are the next thing to try.
February 14th 2012, 05:03 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
.wav's work for me
To add a .wav to a screen so when you walk thru it plays.
1. add the .wav file to the Sound directory (eg: cricket.wav)
2. add a line for your sound file to the start.c
load_sound("cricket.WAV", 50);

50 being the number you allocated it to in dink ini - just use the next sequential number
3. make a script eg (cricket.c)
void main(void)
 {
 playsound(50,22050,0,0,1);
 } 

4. attach that cricket.c script to the screen properties box (play with the frequency numbers till you get the sound effect you want)

or ...add it in the script for the sprite if using a sprite

Nice cricket wav file
February 14th 2012, 06:13 PM
wizardg.gif
Paul
Peasant He/Him United States
 
Incidentally, I hate crickets. They are nasty, cannibalistic, little vermin.
February 14th 2012, 11:32 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
NOOooooooooo hes merely the voice of your conscience - do you have a cannibalistic one of those :I eep ...

Ohh and for your interest its only the males that whine, err I mean stridulate - hes loudest when he's trying to impress the chicks (just saying) *winks*
February 15th 2012, 02:28 AM
dinkdead.gif
Other settings will work as well, I think the problem is that the .wav files need some other info in them of some sort...

You can add this info simply by opening the .wav in a sound editor such as Audacity and then saving it (may need to 'save as' and use the new one if that doesn't work).

Edit: Oh, right, crickets, hah. I thought Skull was talking about cricket and Paul was making a pun, then realised that everyone was talking about cricket from the beginning and no one had mentioned cricket. As in cricket, not crickets.
I'm going back to bed
February 15th 2012, 07:23 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
In case I wasn't being very clear, the game crashes before it gets to the title screen, not in the actual scene.

Anyway, I now know the problem is in the sound file itself. I copied another sound file that was already there (wscream.wav), and named it "cricket". It worked just fine then, but whenever I download a cricket sound file, try to use it, it just crashes.
February 15th 2012, 08:36 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Got it to work. I don't know what the problem was. In any event, I searched for a quality cricket sound, downloaded and added it, and it now works just fine.