The Dink Network

Re: Incorporating WAV files in my project

November 28th 2007, 12:00 PM
duckdie.gif
rexroy
Peasant They/Them
 
I am trying to incorporate .wav format sound files prepared in Audacity but in when I run Dink the sound is not recognizable. I have checked the existing wav files as in FIAT and tried to maintain the sampling rate. Can any one help?
November 28th 2007, 12:11 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Did you load them in start.c?
November 28th 2007, 12:58 PM
duckdie.gif
rexroy
Peasant They/Them
 
NO. in game
November 28th 2007, 02:11 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
open the scrip start.c, and you will see some loadsound commands. you might try to replace some of the loaded sounds with your own.
November 29th 2007, 01:14 PM
duckdie.gif
rexroy
Peasant They/Them
 
I think I have not made myself clear. I have done all that. But when I create a .wav file with AUDACITY the music can be played back by all comon softwares eg. winamp and they plays nicely. But when I am loading the same file through DINK engine it is played as distorted sound not even recognizable. Why it is happening?
November 29th 2007, 03:24 PM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
Are you using the right settings for that wav file? I think the Dink engine is a little picky. I don't know what are the right settings, but I think it's something like 22050 Hz and either 8 or 16-bit, I don't recall which.
November 29th 2007, 10:17 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
I'm currently on break at work so I don't have any of my DinkC references on hand, but I'm pretty sure that has to do with the playback rate used when you use the playsound() function. Just change that in the script you're using to match the normal playback rate of the wav.
December 1st 2007, 12:39 PM
duckdie.gif
rexroy
Peasant They/Them
 
I thought it should be 11025 kHz, 8 bit mono. This is sampling rate of sound files of FIAT. But .wav is a container class. what is the underlying fomat? is it PCM?
December 1st 2007, 03:00 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
The Sound FAQ may have the answers you seek.
December 3rd 2007, 11:15 AM
duckdie.gif
rexroy
Peasant They/Them
 
Thnks redink and all who helped so far. I have checked the file. It tells for 22050 kHZ. Then why FIAT files show 11025 kHz?
December 3rd 2007, 01:12 PM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
As long as the files are the same as you claim they are when you're using playsound(), it might not really matter what they are, now that I think of it...