An Audiophile’s Guide to BF:BC2 (Full)

Hi there!

I'm one of the audio programmers at DICE responsible for the audio tech in Frostbite. We know there are many people out there who care passionately about audio in our games, so we thought it'd be nice to give you some information on how our audio engine works and why we do things the way we do. Hopefully with this information you'll know how to get the most out of the audio in Bad Company on whichever platform you choose to play it on. It's going to get quite technical, but I'll try to summarize each section to make everything crystal clear.


Background

When we started building our "Next Gen" engine, Frostbite, we thought about what "Next Gen" would mean for us on the audio side of things. We came to the conclusion that we wanted to be able to use more filters in order to be able to create more dynamic sound behavior, and we wanted the same functionality and result across all platforms we target. This meant doing all the audio processing ourselves. We'd previously used software mixing in BF:1942 and hybrid hardware/software mixing in BF:Modern Combat on the PS2 (to be able to add some filters and 16 more "voices"), but before this point sound in games was mostly just playing back wave forms almost completely unaffected except for volume and pitch alterations.

This of course meant that we wanted sounds to be able to have an arbitrary amount of filters and submixes in any order, which hardware accelerating audio pipelines simply didn't/doesn't support. We felt confident in the fact that all our target platforms either had moved (Xbox360, PS3) or were about to move (PC) to software-based audio pipelines, instead of having fixed-functionality hardware pipelines (Xbox, PS2, some sound cards on PC), so software mixing was the obvious choice for us.

So in short, we went down a path that let us do things exactly the way we felt we needed to do it in order to continue to deliver a high-quality, innovative aural experience in our games and I hope you all agree we've succeeded!

Performance

Naturally, doing all of the audio processing in software puts the CPU under some extra strain. Since Xbox360/PS3 has fixed hardware and both have multiple cores available to do many things in parallel, you could say this is only an issue for the PC SKU where we may end up having less cores than on console. In Bad Company, all audio processing is performed sequentially on a single hardware thread regardless of platform. For PC this means that a CPU with a higher frequency will help more than one with more cores. But of course, there are other areas of the game that execute in parallel, so having more than 2 cores will help the game in general. This is an area we're constantly looking to improve and the results of our efforts will show up in future titles.

The bottom line is that as long as your computer lives up to the minimum spec for the game, things will be just fine. If you're on console there's obviously no need to worry about this stuff at all.


Fidelity

As is common today, we do all audio processing in 32-bit IEEE floating point (at 48kHz) in order to maintain the highest fidelity possible in the final audio stream we deliver to the platform's underlying audio driver. Our source wave forms are encoded using different codecs depending on what is most optimal for each platform. Those codecs are what affects the quality of the audio that the game produces the most. Once we've passed the audio to the underlying audio driver, any difference in fidelity depends on how that driver mixes our audio in together with other audio streams from other active processes and what gear you have. On PC we convert our audio to 16-bit PCM before sending it to DirectSound instead of relying on DirectSound to do it for us. This is mostly a legacy workaround for compatibility/quality issues with some sound cards, but adding support for more than 16-bit output would result in an invalidation of many years worth of tweaking and tuning done to reliably output quality audio through DirectSound, without any noticeable improvement in final audio fidelity for you guys and a massive increase in QA work for us. I'll dedicate the entire next section to this 16-bit "controversy" so those of you who are already in the know, or simply don't care, can skip it easier.

As I already mentioned, the gear you listen to the game through will of course affect the audio fidelity. If you're really keen on audio, you will want to either avoid using the internal DAC that is on your sound card (PC) or in your console. This is simple to do, just make sure you use digital audio output! It's only once you need to go from digital to analog (like to the speakers) that you will need to go through a DAC. You'll also want to keep the DAC outside your computer/console to reduce the induction of noise from other components. This could be as simple as using an external sound card (PC) or a hi-fi/surround system (consoles or PC if your sound card supports digital output).

The next thing to remember is to turn off as much post-processing as possible and make sure you have nice speakers. Any "enhancements" made to the signal after we send it to the audio driver may introduce unwanted artifacts, so turn off "Cinema" modes, "Crispalizers" and such. This goes for sound cards in PCs, home theatre systems and TVs alike. Our sound designers take great care to mix and even master the game thoughtfully, so make sure to select the "Sound System" setting in the audio options screen so that it corresponds as closely as possible to the gear you have! This way the game will adapt its EQ settings and dynamic range to try and make sure the game sounds as clear as possible through your speakers.

Let's simplify all this down and say that 5.1/48kHz/16-bit will get you the best experience on PC, and on consoles a mid-range sound system will do just fine. The game was made with 5.1 (and stereo) in mind, so there's no need to invest in a fancy new 7.1 system.

Bit Depth

I will try to keep this section short, but in doing so I'll have to make it quite technical. In digital audio, bit depth refers to the dynamic range of each sample in an audio signal. So 16-bit PCM gives us a dynamic range of about 96 dB (the simplified formula is 6*bitCount). Don't confuse bit depth with bit rate (number of bits per second) or sample rate, which decides the highest frequency possible to represent as half the sample rate. The human ear typically has a dynamic range of about 120 dB. So our 16 bits won't fully cover the entire dynamic range of the ear. Now if you simply look at the numbers you might feel that since 96 < 120 it would be obvious to want 24 bits (32-bit DACs aren't really used in consumer products) since the dynamic range would be a whopping 144 dB! In reality however, most consumer DACs will have an SNR (Signal-Noise Ratio) below 96 dB and only if you have a really fancy card it'll have an SNR above 96 dB, if you're lucky. And those are measurements done in an optimal environment, not inside your machine! What that means is that you'll start hearing the noise louder than the intended audio signal as it gets that quiet.

You could of course reason that turning the volume up would make even the quietest signal audible, but consider that even if you might be able to get your sound system to play back a 0 dB FS signal (loudest possible output from a sound card) much louder than 100 dB SPL, you wouldn't be able to stand listening to it for long without your ears hurting. Indeed, around 140 dB SPL would mean painful damage to our ears.

So OK, getting the quietest 16-bit signal loud enough in your speakers to be easily heard isn't the most difficult thing to do, but noise will not be far behind and what you'd hear would not benefit your gaming experience in any way. In fact, the HDR audio system in Frostbite culls sounds on loudness during processing, so the 96 dB of dynamic range that 16-bit PCM gives us is more than sufficient to represent our final mix. Also worth mentioning is the fact that it's more important to have a larger dynamic range earlier in the audio processing chain. For example, recording in 24-bit has clear advantages over 16-bit because you'll want your source material as detailed as possible. This is also why all our processing is done in 32-bit floating point, it will retain our source material's dynamic range as well as possible throughout all the processing that we subject it to. But once we've mixed and mastered everything down to a single "full scale" audio stream, 16 bits means plenty of dynamic range.

In short, don't stare yourself blind on numbers on a box with shiny labels, but by all means make sure you have a nice DAC (high SNR) and some nice speakers.

Hardware Acceleration

I touched upon this briefly in the Background section, but it's worth clarifying. Hardware acceleration has been trailing the obvious development in how audio is treated in games for years, unlike graphics acceleration that instead has pushed that area continuously forward. Nowadays even GPGPUs suit the needs of contemporary audio processing better than do hardware accelerating sound cards and we're very excited about the opportunities that something like Intel's Larrabee might give us.

Also, the main benefit that hardware accelerating sound cards has provided to date has been environmental effects, such as reverberation. We believe that we get equivalent or better, more consistent, results from our software solution for a modest CPU cost by today's standards. Even the software APIs available for these cards are lacking in many areas, mainly by retaining the structure of DirectSound that even Microsoft themselves have now abandoned for game development in favor of the more up-to-date XAudio API.

There's nothing to say these APIs couldn't be updated to support the type of functionality needed for advanced audio processing, but the hardware would really need to approach a more general-purpose processor than what today's cards have and then we're back at Larrabee or simply a regular CPU with more cores.

In Closing

Everyone here in the audio department at DICE are very passionate about what we do and on behalf of all of us I'd like to take this opportunity to thank you all for your encouraging comments and interest in audio in our games, be it on the blog, forums or in comments on videos!

We'll keep an eye on your comments for thoughts that might inspire another post about audio in Frostbite.

Thank you.

Comments
  • Post a comment
    You must be logged in to comment. Log in
  • HapiJuic 02.14.11 at 07:09

    TLTR
    I LOVE the voice acting in BF:BC2. Seriously one of the reasons I just love playing this game is for the great voice overs. They sound fu@&ing badass

  • SaLaNoS 08.21.10 at 23:13

    So considering all this, what audio settings should I use on my ASUS XONAR?
    16-bit, 48KHz, 5.1?
    I’m presently running 24-bit, 96KHz with 7.1.

  • Swolenator 07.05.10 at 12:57

    Maybe someone can tell me what to set my settings to so that I get the best experience sound wise. I have x-fi titanium sound card and audio technica ath-a900 headphones plugged into the back of it. As it is now it says under windows sound playback that it is speakers creative xfi working 24 bit 48hz. I have the creative settings to headphones. Can someone explain the digital out? How to setup?

  • REIGNnBL00D 07.02.10 at 13:18

    could you guys turn the sound down on the inbetween game cinamatics its blowing holes in me gosh darn eardrums everything else is fine what what you say i gota yank my headphones off after every game please its killing my ears maddness lol make it stop

  • GreyWolf258 04.18.10 at 13:33

    i have a 5.1 surround but i have a problem with the bass, the sound is fantastic by the way dice but i cant figure out how to boost the bass for my xbox, i dont know if it is my sound system, my xbox or the game, can you help?

  • 1)awnPatrol 04.02.10 at 15:28

    DICE and EA,

    I wanted to really say thanks for the great games you have provided on the PC platform. I loved all the Battlefield series and own them all. They are very well designed from all aspects. BC2 on the PC is by far one of the best tactical FPS’s i have ever played. What is great about your Battlefield series is not only is the game fun just jumping into a random server, but it’s an entirely new experience when you play with an organized group. I wound up joining a BF2 clan back in the day that had a bunch of dedicated players some of which were ex-military. The game is entirely awesome experience when played in this fashion. The commander/squad structure you developed made a lot of sense and helped with organization and structure. It was a very easy to use user interface that made sense.

    I really appreciate your commitment to the PC platform. As a software developer by trade, I understand the challenges of targeting a population of hardware/software that is not controlled. I know this is expensive, and difficult to create a game that can scale to a wide variety of customer builds. At the same time the PC is the best platform because you have the ability to create graphics and game play on bleeding edge hardware with robust controls. I am sure this is exciting to develop for the high end as well.

    I have tried to play games on consoles over the years and can’t stand it. I have owned am xbox twice only to sell it 3 months later. I own a PS3, and don’t play any games on it at all (although I’ve tried). The player demographic is much younger and less mature than the PC. I guess I am considered an enthusiast. I probably spend 1000 dollars on upgrading my PC every year. I build my own, and love every minute of it. I have been a hardcore PC gamer since the 80s. I have owned systems such as: TRS-80, IBM PC Jr, Commodore 64, and the Atari 520 ST. I almost never have problems that you see described by people who post all their issues on similar forums. I think most of these problems are self inflicted. These folks almost never take accountability and people have dirty systems, do stupid installs, or just don’t understand the platform.

    In your game design, I also appreciate your attention to detail for sound. I really care about sound. When you released the ultra setting in BF2, I went out and bought an x-fi card. It was worth every penny. The definition and sound I experienced was like no other. No other companies invest into sound like you do. When I read the blog of your sound engineer, I was stoked for weeks. I hope you continue your attention to this.

    Regardless, I hope you continue to support the PC platform. I am not sure how to email your development team directly, so I hope this makes it to them.
    You better believe I will be buying BF3 the second it’s available for preorder. In fact any game that DICE is part of will be at the top of my list.

    My only requests for future BF games:
    - MOAB bombs (utter destruction)
    - Low and slow air strikes that you can call in (with heavy sound to go with it).
    - Prone
    - Some night vision stuff
    - Napalm
    - Cluster bombs
    - Daisy cutters

    Thanks for the great games!

  • jjsoviet 03.16.10 at 18:25

    Bad Company 2 + Sennheiser HD555 = OVERKILL. You’re basically able to use positional audio to your advantage it’s not even funny. :P

    If you have Sennheiser HD600′s, AKG K1000′s, Audio Technica ATh-A900′s or Grado GS1000′s… it’s GG. :D

  • DoubleMint 03.14.10 at 19:27

    I’ve been really blown away by Bad Company’s sound design, and Frostbite’s capabilities with sound. I also found this article informative: http://www.develop-online.net/features/180/Heard-About-Battlefield-Bad-Company
    It sounds like you guys really know what you’re doing at Dice. I was wondering, what kind of setup do you have for field recording? Was there a lot of new audio recorded for BC2?

  • TylerC 03.10.10 at 20:23

    Great engine, but can you optimize the source code ? Sound processing really lows the frame rate.

    Check my thread in Steam Forums. Im not an audio technician expert, but what I know is that I raise about 15 frames per second by downgrade the sample rate to 16bit 44khz.

    http://forums.steampowered.com/forums/showthread.php?p=13951439&posted=1#post13951439

  • {GD}Spunky 03.05.10 at 08:22

    Do you at DICE think that an external DAC is unilaterally superior to any PC sound card? I’m curious about this because (on paper) some of the higher end consumer cards from folks like HT Omega, Asus, Auzentech, etc. often have superior DACs, opamps, etc. compared to mainstream cheapo receivers–heck, I found the Claro Plus to be superior to my NAD T753 running analog to the multichannel external inputs. Electronic interference is worth mentioning, though some of these cards have EMI shields for that reason.

    With all the talk about focus on audio in Bad Company 1 and 2 for the last couple years, it would be awesome if you guys could post some full resolution audio samples from in-game. Most titles out there are reduced flat, un-dynamic piles of noise in the final mix, heartbreaking when the effects themselves are wonderfully done.

  • Hilden 03.04.10 at 13:21

    Btw, tried all speaker settings, and yes, all my settings in the computer are maxed (using build-in sound)

  • Hilden 03.04.10 at 13:19

    Got a huge problem. Can’t hear the dialogue at the cutscenes in the game. I maxed the dialogue sound but that only affects while actually playing and not watching cutscenes. If you turn off the music and sound effects you can hear the voices like tiny whispers. Also, the subtitles are around 5secs after than they’re supposed to, so I don’t get anything they say at all :S

  • STUN-LA 02.10.10 at 08:23

    As a professional audio engineer… I can’t wait to hear how it sounds in 5.1.

  • DVA-Deadly 02.08.10 at 03:04

    Thats for a fantastic write up on the sound! After playing the PC beta l was blown away with the sound, its amazing full stop end of! The first time an explosion happend next to me l could feel the bass of the shockwave also your attention to detail with the sound is very impressive, walk past a tree and you can hear the snow fall off it its wonderfull to have that experence in game. And when l put on my Sennheiser’s WOW! Cant wait to play the finished product. One last thing who ever decided to put in a VOIP mute button, please buy that person a beer! A feature thats missing in a lot of modern games.

  • MeisterGlanz 02.03.10 at 08:38

    Surround over Digital Out (Dolby Digital Stream)please, that would be nice

1 2 3 4
GET CONNECTED