Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I work as a multi-purpose engineer/developer at a very small startup game company. Recently, I've been asked to help out with audio development and editing, and I've been mostly able to hold my own.

I'm unfamiliar with sample rates though: I understand what they are, and I know 44100 Hz is considered a safe default because it's CD Quality.

However: Is there a practical max sample rate above which the human ear can no longer hear an improvement? In graphics, we have a guideline that humans cannot tell the difference above 60 frames of animation per second (although some people are starting to say 75-90 Hz, I think). Is there a similar upper limit in audio development?

share|improve this question
1  
+1 Good question and welcome to the site! –  ashes999 Sep 19 '13 at 15:11
1  
Please don't cross post. avp.stackexchange.com/questions/8997/max-audio-sample-rates You're sure to waste the time of at least a few people. –  Byte56 Sep 19 '13 at 15:47
    
I apologize. I wasn't sure which site would be able to help me more. –  LyonesGamer Sep 19 '13 at 15:53
    
By the way, the 60 Hz guideline in graphics is such an extreme simplification of how the human eye works, it's really just fiction. –  Marcks Thomas Sep 24 '13 at 11:37

6 Answers 6

up vote 4 down vote accepted

The ear is analog. So there's no defined sampling rate (a digital restriction) that would match best with what humans hear. The typical approach here is empirical testing. Luckily, most of that work has been done already, and you can just pick one of the higher standard sampling rates. (It's best to pick one of the standard rates, since most hardware is configured for those rates).

Wikipedia lists some of those standards:

  • 88,200 Hz

    Sampling rate used by some professional recording equipment when the destination is CD (multiples of 44,100 Hz). Some pro audio gear uses (or is able to select) 88.2 kHz sampling, including mixers, EQs, compressors, reverb, crossovers and recording devices.

  • 96,000 Hz

    DVD-Audio, some LPCM DVD tracks, BD-ROM (Blu-ray Disc) audio tracks, HD DVD (High-Definition DVD) audio tracks. Some professional recording and production gear is able to select 96 kHz sampling. This sampling frequency is twice the 48 kHz standard commonly used with audio on professional equipment.

  • 176,400 Hz

    Sampling rate used by HDCD recorders and other professional applications for CD production.

  • 192,000 Hz

    DVD-Audio, some LPCM DVD tracks, BD-ROM (Blu-ray Disc) audio tracks, and HD DVD (High-Definition DVD) audio tracks, High-Definition audio recording devices and audio editing software. This sampling frequency is four times the 48 kHz standard commonly used with audio on professional video equipment.

Clearly you could just pick the highest frequency you can get. But there are other considerations. Primarily, the hardware being used to playback the audio. Typical configurations for PCs are usually around 96 kHz. The most common sound card out there is the Realtek HD Audio and its manual lists its typical rates:

44.1KHz: This is recommend while playing CD

48KHz: This is recommended while playing DVD or Dolby.

96KHz: This is recommended while playing DVD-Audio.

As with many things in software (and "IRL"), it's a balancing act. If your game has audio as a primary features, you'll want to include high quality sound but you may want to keep the storage requirements low too. The production of higher quality sound is also typically more expensive, with higher equipment cost and more processing times.

In my opinion, 96,000 Hz is enough.

share|improve this answer
    
Thank you, that was a very descriptive answer. That helps me very greatly. –  LyonesGamer Sep 19 '13 at 15:52
    
side note: I have a motherboard with a Realtek chipset and a Dolby receiver over optical: forcing 96k playback disables Dolby (forces stereo). Not sure what implications this has for gaming... –  horatio Sep 19 '13 at 16:02
1  
For a more detailed (and correct) answer, you might want to check this out: evolver.fm/2012/10/04/… –  Bjorn Roche Sep 19 '13 at 17:48
1  
It is not my article. Izhaki's answer on the cross-post (avp.stackexchange.com/questions/8997/max-audio-sample-rates) is an excellent round-up. –  Bjorn Roche Sep 19 '13 at 18:12
2  
This answer is not correct. Storing audio for playback at 96000Hz is at best a huge waste of space, and at worst a fabulous way to insert ultrasonic distortion. There are advantages when recording and storing audio at high frequencies, for processing purposes. But once you're going for playback, 44100Hz is enough, as it can perfectly represent 20KHz frequencies, which is the highest humans can hear. Almost all hardware (and most likely all consumer-grade hardware) won't even support playback at frequencies greater than 48KHz anyways... –  Panda Pajama Sep 24 '13 at 5:56

The audible frequency range (pitch) for humans is usually considered to be 20 to 20,000 Hz https://en.wikipedia.org/wiki/Hearing_range

Because of a phenomenon known as the Nyquist limit, you must sample at a rate at least double the frequency of the signal you want to reproduce. Note 44100 is double 22050 or slightly above the top of the human hearing range. If you don't care about high frequencies you can sample at a lower rate. You primarily see this in audio codecs not targeting music, like Speex. https://en.wikipedia.org/wiki/Nyquist_frequency

It isn't like graphics frame rates it is more like compressing images, fewer samples means there is less data available to reconstruct the image\sound wave. With lower sample rates you get what amounts to dithering in overly compressed images. Sampling below the Nyquist limit of a particular sound more or less means that sound is lost. Sampling above the Nyquist limit means the sound is reproduced more accurately. Lowering the sample rate impacts treble before bass, so if your high notes aren't crisp and clean sounding raising the sample rate may help.

share|improve this answer
    
Note that the Sampling frequency and the hearing range of humans (Sound frequency (pitch)) are not the same thing. This question is asking about the number of samples per second. Humans can hear sound waves with a frequency of about 20 to 20,000 Hz (that's pitch, not sampling rate). Please fix that. –  Byte56 Sep 19 '13 at 15:29
    
@Byte56 Right but Sample rate directly impacts what frequencies will be reproducible. So if all you care about is speech, sampling at 8Khz is doable, and 16Khz is good enough. If you need the full audio spectrum for music or what not then you need a higher sample rate to not lose signal. 44Khz is kind of like 60hz in graphics it is the minimum sample rate that will get good results for the entire human hearable frequency. –  stonemetal Sep 19 '13 at 15:39
4  
@Byte56: to properly reconstruct the sound frequency one must use a sample frequency approx. twice the maximum sound frequency. Your answer certainly speaks about the possibilities, but stonemetal is speaking about the minimum and why. –  horatio Sep 19 '13 at 15:40
1  
also, this is a duplicate from avp.stackexchange.com/questions/8997/max-audio-sample-rates –  horatio Sep 19 '13 at 15:42
1  
@drummerp Please don't do that. It's a selfish way to use the stack exchange sites. In the future, only post on the site that you feel is most appropriate. Only after a question is taken down or closed should you post to a different site. –  Byte56 Sep 19 '13 at 15:54

As with graphics, it really depends on the content. You can use a 8kHz sample rate for certain sounds (for example a voice over a 2-way radio) and the quality will be indistinguishable from the same so d using a 48kHz sample rate.

Another important question is what your target audience and platform is. If you are targeting an iPhone, you won't want to use a super high quality sample rate, because the hardware will not necessarily profit from it. Additionally if you are playing a Facebook game, you'll want a smaller footprint and a lower sample rate would help reduce the audio footprint.

Modern AAA video games don't use anything higher than 48kHz, because of application size and hardware constraints. The native sample rate for most Android devices is 44.1 kHz, and I believe iOS devices are the same. For Windows it is 44.1 kHz (or 48kHz depending sound card).

It is important to note, on Windows, that while the sound card may support 96 kHz, you can only use the sample rate the system has configured.

share|improve this answer

The answer you've selected is the least accurate of the bunch, but there's a lot of information missing in the other 3 as well. The question has 4 contexts:

  1. Playback perception. As has been mentioned, 44.1khz is more than enough for human hearing. However, there is some evidence that higher samplerates may not be consciously perceived but nevertheless affect subconscious perception of listening as is demonstrated in this study. It is generally acknowledged that the conscious difference between 16bit and 24-bit audio is more noticeable than between 44.1khz and 96khz audio.
  2. Recording. In this field many (mainly lower-quality) ADC's (analog-digital convertors) do a better job when recording at higher samplerates than 44.1khz due to poor filtering. However in most professional-grade (ie. non-prosumer) solutions high-end ADC's the difference is minimalised. Despite this many professionals choose to record at 48khz or 96khz due to the final two scenarios below.
  3. Processing. In the field of DSP's and audio plugins, aliasing means that a lower samplerate is likely to contain more artifacts. However in a well-designed plugin, a developer can shift the audible aliasing above the human hearing threshold ie. above 22khz, if the samplerate is 60khz or above.
  4. Output device/format. As noted, CDs use 44.1khz, games use 44.1 or 48khz, DVDs generally use 48khz but can use 96khz (but almost never do), DVDa and high-audio formats use 96khz or 192khz respectively. But there is no reason to record/process at 44.1khz just because your end-format is 44.1khz, and in fact you almost always should not do so due to the reasons above. Resampling algorithms have come a long, long way from the 1990's and a downsample from 96khz to 44.1khz creates zero audible artifacting, certainly a lot less than recording and processing at 44.1khz will create. However if aiming for a higher-samplerate end-format, it's ideal to record and process at the end-format samplerate, where possible. Again, upsampling is not so problematic nowadays either.

This is stuff I understand both intellectually and perceive subjectively from having run a music studio, doing sound for various formats and platforms, including games, for the past 10 years. Cheers-

share|improve this answer
    
I have to wonder if that 16/24bit audible difference is partially due to loudness wars =) –  Jari Komppa May 19 at 5:55
    
Hi Jari, I'm not quite sure what you mean by that statement, for example, with Nine Inch Nail's "The Slip" album (released for free, in 24-bit/96khz as well as regular formats), the difference was indistinguishable due to the overall loudness 'maximising' that was going on. It was actually pointless to include that version. On the other hand, many more structured, well-produced albums benefit substantially from higher resolution treatments. Again this could be because of crappy DAC's in the output devices which operate better at 96khz than at 44.1k, but 24-bit->16-bit is extremely noticable. –  metamorphosis May 19 at 23:37
    
Interesting. My thought was that due to over-using compression we're pretty much losing bit depth, so adding bits would "kind of" help with that. –  Jari Komppa May 20 at 6:24
    
Unfortunately it's the opposite - because of the heavy limiting, there is very little dynamic range - and because of that, it's difficult to hear any small volumetric differences. An interesting example: audiocheck.net/blindtests_16vs8bit.php –  metamorphosis May 21 at 0:38

I used to work for a games company in audio and produced tools/engines for audio work. Basically the sound engineer would choose a sample rate for each sample (or more likely, group of samples). Generally:

  • High Quality (44100, 48000) for music
  • Medium Quality (22050) for sound effects
  • Low Quality (11025) for speech

As with everything, it all depends.

If you've got 80GBytes of audio data and only 2 or 3 GBytes to fit it into, you're going to do a number of things:

  1. reduce sampling rate until you feel it sounds ok at that point, but worse any lower.
  2. reduce the number of channels to mono unless it's music.
  3. use some compression technique - this depends on the platform.

Each platforms has its own compression tools - so I wrote a tool that did sample rate conversion and the appropriate compression, so you could have one set of master assets with several output targets. Some platforms have a hardware decompressor, so you can take advantage of those avoiding a hit on the game processor.

When I first joined, the sound engineers complained it took weeks to get sound into a game before they could hear the results of their changes; with the tool I wrote (which could preview the sound after processing), it got down to hours instead.

Another thing I got working was in game level mixing. The game had a means to show audio channel settings that could be overridden while the game is running and let a sound design tweak the levels in situ. I seem to remember there are YouTube videos of others doing this. Sadly I don't have the ones I had for my implementation.

share|improve this answer

A few other things to consider as well.

  • Samples can often be mono, but they will often be played back from a "world position" relative to the listener. This will give the sample its position (or pan) in the stero/surround sound stage.
  • Realistically, human hearing is about 20hz (ish) to about 20khz (ish). Below ~50hz we start to feel more than we can hear. The top end decreases with age.
  • This is why CD audio is sampled at 44khz, as the Nyquist Frequency will be 22khz for CD's. You can use that rule to work out the sample rate you have to use depending on the upper frequencies of your samples. You can often get away with lower sample rates if the content does not contain any high frequency content (or content you don't mind losing)

To answer your actual question, it's more about the device you use to play the audio back (and the room you're in!), than the format or quality you record it at. Amplifiers and DA/AD converters have got a lot better, and cheaper, but you're still going to struggle to find consumer headphones or speakers that will accurately reproduce content below 50hz, even with a subwoofer. Consumer audio hardware is often "hyped" towards the upper midrange as well, at the expense of actual midrange reproduction accuracy and even with expensive monitors, lack of room treatment will also considerably colour the reproduced audio.

Most people are going to be hard pressed to hear the difference between 96 and 44khz, much like most people cant tell the difference between 128 and 192kbps mp3's purely due to their playback hardware ;)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.