Custom sound not working- very strange.

I have 2 .wavs and have double and triple checked their sample rate which I changed with audacity it is 44100khz. Added the sounds into Hammer. Sounds can be previewed fine in hammer. When I load up the game, can’t hear the sounds. The console tells me for one of the sounds “soundxxxx invalid sample rate (32000)” and for the other sound “soundxxxx invalid sample rate (8000)” This is NOT the sample rate of my sounds! Wtf! I have tried everything, every sample rate, and the console just keeps trying to tell me that the sounds are at different sample rates than what they actually are.

put your sample rate down to 22,050 kHz

Hello llVeXXll,

for wav files the correct rate is 11025Hz to work in ambient_generics and soundscapes, but I recommend you to work with mp3 files. Working with mp3 files can improve the sound quality and the file size.

They don’t work with preview in hammer, but work fine in game if you use them correctly.

For mp3 use, use audacity to convert your mp3 files to the frequency you were using with the wav files, 44100Hz.

If you’re having troubles, check this tutorial by TopHattWaffle.

Hope it helps

Hello Aspen and glitchvid, can you guys post why you rate disagree ? Instead of just rating you could post a ‘your correct way’ for both the op and for the misled me here, in past I used only ambient generics using 11025hz then a user give me a advice to work with mp3 files using the rate of 44100Hz, it’s working fine until now, if you have a better way for quality/size improvement, let me know.

Thanks

THANKYOU nicolasx. This worked. I was confused because i thought sample rate was the same as project rate, (same for wavs and mp3s). Finally I have sound in game. Although it doesnt work unless i pakrat it into the bsp first, but who cares.

Because a 11025hz rate will provide really, REALLY crappy quality; source works fine with 44.1Khz and 48Khz.

Edit:
Eyup, just tested it with a 16bit .WAV at 48Khz, worked perfectly fine.

well it wasnt working for me at that khz so there must be something we’re missing

Yeah, odd, since my MP3 audio won’t work. (I’m using Audacity)

Oh source!

44k is always what I use, Also a good thing to check for is if it is a raw sound or game sound in the sound browser

Thanks ! and yes, 11025Hz makes a really crappy sound, but using 44+Hz makes a simple 3 min mp3 music with 3mb turns into a wav with 15+mb this will fuck the size of the bsp if you are using pakrat

Well llVeXXll check the bit rate of the wavs, make sure its 16bit like glitchvid said, I forgot to mention this, I think another bitrate will break the sound in source engine… if you try to use mp3, the sounds will not work until you pakrat them… to the wavs files work without pakrat, you’ll have to make a folder in the sound directory, and find the sounds with the RAW option in hammer, but I’m not sure why its not working, might be a bug or something…

I think its a bug with cs go. Yes I was using 16 bit. The wavs will ONLY work with 11025hz rate, any other and I get the invalid sample rate console message. It doesnt matter whether it’s wav or mp3, neither will work until I pakrat them. Whichever way. I’m just happy that I got my sound in game, it doesnt have to be super duper quality.