Can someone tell me how to *import* custom sounds?

XFunc_CaRteR

L5: Dapper Member
May 14, 2009
248
17
I know all about using ambient_generics and soundscapes with existing in-game sounds.

Does anyone know how to get custom sounds working with a new map? Sounds you brought in from a different Valve games, or just ones you want to bring in on your own?

I believe there is a command called snd_buildsoundcachefordirectory, to "rebuild the sound cache", but I don't know what path we're supposed to use.

Also, is there anything really different for post-OrangeBox games with this?

thx
 

lana

Currently On: ?????
aa
Sep 28, 2009
3,075
2,778
You should just be able to drop the sounds in your /tf/sounds/ folder and get them working. As long as you distribute the sound with your map, they should work fine.
 

XFunc_CaRteR

L5: Dapper Member
May 14, 2009
248
17
You should just be able to drop the sounds in your /tf/sounds/ folder and get them working. As long as you distribute the sound with your map, they should work fine.

I drop .wav files, and whatnot, into my sounds folder, as noted above. Then I reference them in ambient generics. I get warnings in the console, when playing the game (Alien Swarm, actually), that said files can't be read. Yes, the sounds don't play.

(It actually isn't difficult to drop a sound file into a folder. Sorry, but I'm not that stupid. It's really easy actually. Still it's hard to get these Valve games to play the sounds.)

But, nevermindthat, I also imported custom sounds into TF2 and they wouldn't play either.

There is an issue with rebuilding the sound cache that seems unaddressed here.

Over here there is reference to rebuilding the sound cache. But there is very little documentation on this. So I'm asking for some step-by-step instructions on that, if anyone knows any - or if anyone knows a tutorial for this.
 

Tehrasha

L3: Member
Nov 5, 2009
115
28
You just have to make sure the sounds are the same format as the ones being replaced.
Not just being wav, but the same bit depth, stereo/mono, and sample rates as well.

Also, they wont play if the server you are on is set 'sv_pure 2'.
 

XFunc_CaRteR

L5: Dapper Member
May 14, 2009
248
17
You just have to make sure the sounds are the same format as the ones being replaced.
Not just being wav, but the same bit depth, stereo/mono, and sample rates as well.

Also, they wont play if the server you are on is set 'sv_pure 2'.

I'm adding new custom sounds, not "replacing" sounds.

Finally, as a mapper, I have no control over what settings anyone's server has when they play my map.
 

gamemaster1996

L13: Stunning Member
Sep 30, 2009
1,064
134
You just have to make sure the sounds are the same format as the ones being replaced.
Not just being wav, but the same bit depth, stereo/mono, and sample rates as well.

Also, they wont play if the server you are on is set 'sv_pure 2'.

I think it doesn't matter if It's a new sound (hence my ability to play the great escape theme on an old custom map..)
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Just to be clear here...

The problem is you can't even get the map to preview correctly on your own computer, and this has nothing (yet) to do with packaging assets into the BSP for later?
 

lana

Currently On: ?????
aa
Sep 28, 2009
3,075
2,778
- snip -
 
Last edited:
Sep 12, 2008
1,272
1,141
It's probably the fact that they aren't saved with the correct bitrate/samplefrequency/whatever... Sample frequency should be 44100 Hz, and I think the sample size should be 16 bit. But I might be wrong :p
 

lana

Currently On: ?????
aa
Sep 28, 2009
3,075
2,778
Okay, the problem is that your sound cache is out of date, right? Alien Swarm does this. After a quick search I found this solution: try using snd_rebuildaudiocache in console.
 
Last edited:

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
It's probably the fact that they aren't saved with the correct bitrate/samplefrequency/whatever... Sample frequency should be 44100 Hz, and I think the sample size should be 16 bit. But I might be wrong :p

Also, make sure it's mono, not stereo.
 
Oct 6, 2008
1,947
445
It's probably the fact that they aren't saved with the correct bitrate/samplefrequency/whatever... Sample frequency should be 44100 Hz, and I think the sample size should be 16 bit. But I might be wrong :p

I think I read somewhere that said they should be 8 bit - but you do have to make it a monotone file.