The Dink Network

Sound question

March 11th 2010, 08:54 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
I downloaded some royalty free sound effects, but I'm having trouble actually getting them into the game.

It's a mono, 22050hz file, yet it doesn't play when I use playsound. You just hear a tiny short "tch" sound instead. Now, when I copy the track from the sound effect to that of an existing sound effect it works, but is distorted.

Any rules I'm not aware of concerning the use of sound effects? Does the bitrate factor in?

For those of you who want to go through some more trouble to help me, this is the sound file I'm talking about: Link.
March 11th 2010, 11:14 AM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
.wav files should work so long as they're declared in start.c and given a playback number. Then you just have to tell Dink to play that sound number, making sure the sound is in the sound folder.
For example:
void main(void)
{
debug("Loading Sounds..");
  //Woman Screaming loadsound, since it isn't loaded by default to a DMod
 load_sound("WSCREAM.WAV", 53);

That particular one loads directly from the Dink sound folder, however, rather than a Dmod's sound folder unless theres a file there with that name.
March 11th 2010, 11:19 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Well it's declared in my main.c but that shouldn't be a problem right? It works for my other custom sounds anyway

As I explained, the problem seems to lie in the actual sound file, the way the wave file itself is configured. Just try it with the one I linked and you'll see
March 11th 2010, 11:25 AM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
... its declared in Main.C? No no no, you declare it in START.C.

EDIT: I just looked at your profile and saw you're the fellow who uploaded the Maori Dmod... must... resist making comments.... about Dmod... relating to my country...

EDIT 2: And there shouldn't be any rules regarding it that I'm not aware of, other than a limited amount of .wav files Dink can handle.
March 11th 2010, 11:31 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Go ahead, comment on it I made it as a school project with NO prior knowledge, everything in it is fake I just had to make it look like it could have been real for the teachers xD Pretty sad I know :/ Hope I didn't offend you

Anyway, since I made that one I've evolved xD Look forward to the next thing coming from me, soonish

EDIT: But, please, try that .wav file if you can, it shouldn't take long at all It's just that I'd like to stop looking if perhaps it's something only related to my computer.
March 11th 2010, 11:35 AM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Well, looking foreward to your next one then

As for the Maori Dmod... it definitely lacks actual knowledge, but nice work if it did fool the teachers
And no offence taken, I'm not of Maori decent even though I'm from New Zealand.
Though its disappointing to try and learn something about your own country, when its taught by someone with no knowledge at the time I've been meaning to give it a review (would get a 6.5-7.0 scoreish) pointing out and correcting any incorrect knowledge though.
March 11th 2010, 11:41 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
That would be a good idea, I'm intersted in the actual facts And it's definitely not worth a 6.5 More like a 4.0 the way it's got nothing aside from hacking and slashing and of course gibberish information.
March 11th 2010, 11:45 AM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Sounds like you're planning an update
March 11th 2010, 11:46 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Nah, I'm not going back to the old work, too busy with the new. If anything, maybe I'd have it removed from the DN so people can forget about that abomination Then again, it should be funny to see the difference in quality
March 11th 2010, 11:49 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I'm pretty sure it doesn't matter where you load the sounds.

I've had a similar problem with using downloaded sounds, I had to change the hz or whatever (sorry, I'm not very familiar with sound files). Just base it off one of the original Dink sounds.
March 11th 2010, 12:02 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Yeah, but it's at 22050hz, which is used by many files and is even said to be common and functional in the DinkC Reference book I'm holding right now

I guess the solution is to just look for another sound file
March 11th 2010, 12:12 PM
dinkdead.gif
I think it has something to do with needing a note attached... or something. Open it in an editor like Audacity and just save it (or save as) and it should work. Never had this problem myself though.

Edit: Ok maybe I'm wrong - apparently it will crash rather than just not play it with the bug I'm thinking of.
SimonK: "Of note is that the sound needs to have a certain format in which copyright information is stored in it. Without this DMODs crash when the load_sound() command is run. Shareware Audio Editing Programs can add this information to your custom .wav file to solve this problem – to my knowledge Silencer was the first person to document this"
March 11th 2010, 12:18 PM
spike.gif
Yeah, Dink looks for some extra information in the sound file... If it can't find any, the sound might not work right, though that usually just causes the sound to stop playing abruptly after a second or two. But it might as well be some other weird problem, just opening & saving a file is always a good thing to try.
March 11th 2010, 12:19 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Thanks, I'll look into that
March 11th 2010, 11:41 PM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
Copyright information? Eh?

The playsound command needs to be given the sampling rate of the sound in hertz. Otherwise, it won't sound right, or it will play it at variable sampling rates, like when Dink gets hurt.

Of course you can create some interesting effects by playing 44.1khz wav files at higher or lower sampling rates. That's how one of the original sounds was made, the pickup noise was just the punch(?) sound played at a higher rate.
March 12th 2010, 02:02 AM
knightgl.gif
zeddexx
Peasant He/Him New Zealand
I'm pretty sure I'm worth atleast SIX goats... 
I always use audacity for these problems too. always works man .
its a free download.
March 12th 2010, 07:27 AM
spike.gif
Got around to testing the sound in the OP. It works perfectly fine for me in regular Dink as well as FreeDink, so this might not actually be a problem with the game.
March 12th 2010, 10:50 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Indeed, after adding the copyright info it still doesn't work for me, but every other sound I throw at it works, so I'm just gonna take the easy way out and not use that sound file

Thanks for the information though, I could have wasted much more time figuring this out otherwise.
March 12th 2010, 05:57 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
This might seem completely redundant, but what if you try recording the sound to another wav with a different hz measurement and on stereo or something? Just tell your sound editing program (goldwave, audacity etc.) to record out of the speakers.