Ambient_Generic Sample Rate Problem

Ambient sounds, game effects and music creation.

Ambient_Generic Sample Rate Problem

Postby ntwiles on Tue Jun 16, 2009 9:50 am

Ok this has probably been asked a thousand times but I can't find it anywhere. I keep getting the error "invalid sample rate (32000) for sound..." when I try to play a sound effect. I read that sound effects need to be Mono, 11025 Hz, and 8-bit to work in Half Life. I used Audacity to convert it and I'm almost positive its Mono, 11025 Hz, 16-bit now (I don't see a way to convert to 8-bit in Audacity). Is the problem really the 16-bit even though the error says sample rate?
User avatar
ntwiles
Member
Member
 
Joined: Mon Jun 15, 2009 6:05 pm

Re: Ambient_Generic Sample Rate Problem

Postby Habboi on Tue Jun 16, 2009 11:34 am

Are you talking about HL1 or 2?

I haven't modded 1 in years so I can't answer that but for 2:

It can be either a wav or an MP3. If you want it to loop then it has to be a wav with cue points etc. Export it as as a PCM Signed 16 Bit Mono. Despite being Mono, Source still makes it surround the speakers. If you're doing this for L4D then you need to refresh the audio cache ingame but atm I wouldn't bother as every other player would have to do it and it takes 10 mins.

Hope that helps. Always works fine for me when I export as the above setting. By the way the max as far as I am aware is 44100 sampling rate.
http://www.habboi.co.uk - Habboi's Portfolio

3D Art Director working on indie title "A Hat in Time" by Gears for Breakfast.
http://hatintime.com/
User avatar
Habboi
Veteran
Veteran
 
Joined: Fri Apr 15, 2005 9:52 pm

Re: Ambient_Generic Sample Rate Problem

Postby ntwiles on Tue Jun 16, 2009 12:02 pm

I did mean HL2 my bad. I'm using .wav and I don't need it to loop just play once. I exported it as 16 bit mono but I don't know what PCM Signed means. Does Audacity allow you to do that?

I can select the sound in Hammer and when I preview it it sounds fine, but whenever I test in game I get nothing and the console error always says "invalid sample rate (32000) for sound mod/secret_unlocked.wav".
User avatar
ntwiles
Member
Member
 
Joined: Mon Jun 15, 2009 6:05 pm

Re: Ambient_Generic Sample Rate Problem

Postby Habboi on Tue Jun 16, 2009 12:17 pm

I use Goldwave so I don't know what Audicity is like however when I select save as, it gives me the option to select .wav which comes up as:

Image

This always works for me. I tend to use 44,100 though unless the sound is more high pitched.
http://www.habboi.co.uk - Habboi's Portfolio

3D Art Director working on indie title "A Hat in Time" by Gears for Breakfast.
http://hatintime.com/
User avatar
Habboi
Veteran
Veteran
 
Joined: Fri Apr 15, 2005 9:52 pm

Re: Ambient_Generic Sample Rate Problem

Postby ntwiles on Tue Jun 16, 2009 12:32 pm

You are awesome. I downloaded Goldwave and I figured it out with that. Apparently 32000 isn't allowed for some reason, but 44100 is. Go figure. Thanks for the help man.
User avatar
ntwiles
Member
Member
 
Joined: Mon Jun 15, 2009 6:05 pm

Re: Ambient_Generic Sample Rate Problem

Postby Habboi on Tue Jun 16, 2009 1:13 pm

Excellent. I hope you put that effort into good use. Don't waste it.
http://www.habboi.co.uk - Habboi's Portfolio

3D Art Director working on indie title "A Hat in Time" by Gears for Breakfast.
http://hatintime.com/
User avatar
Habboi
Veteran
Veteran
 
Joined: Fri Apr 15, 2005 9:52 pm

Re: Ambient_Generic Sample Rate Problem

Postby DjBourgeoisie on Tue Jun 16, 2009 2:09 pm

You can use 22 khz and not really lose any quality, but cut the file size in half.
Designer @ Red Storm Entertainment
www.deej-ld.com
User avatar
DjBourgeoisie
Regular
Regular
 
Joined: Tue Nov 30, 2004 5:54 pm
Location: Studio Radi-8

Re: Ambient_Generic Sample Rate Problem

Postby ntwiles on Tue Jun 16, 2009 3:38 pm

DjBourgeoisie wrote:You can use 22 khz and not really lose any quality, but cut the file size in half.


Good to know. My map is pretty small right now so it won't make much of a difference.

And it definitely will Habboi. It's the Zelda "puzzle solved" sound effect from the thread you helped me on yesterday.
User avatar
ntwiles
Member
Member
 
Joined: Mon Jun 15, 2009 6:05 pm

Return to Audio

Who is online

Users browsing this forum: No registered users