How does audio in games typically work

blevinsderek06

Honorable
Oct 22, 2013
8
0
10,510
I've got some questions about how audio in games is output. I have a sound card with dolby digital live. I have that enabled so 5.1 audio is encoded and sent to my avr as DD. I also have the prologic encoder enabled on the sound card so that stereo sources are encoded into 5.1 and sent to my avr.

I was playing dragonball xenoverse and noticed that it was only coming out stereo. I have tested stereo videos and can confirm that the prologic encoder on my sound card does work and converts it to 5.1 for my avr to decode. So i turned off dolby digital live so that only 2 channel pcm would be sent through the spdif connection to my avr and my avr was then able to enable prologic for dragonball xenoverse.

I loaded up gta 5 and reinabled dolby digital live. I set the game sound to surround and it sent 5.1 channel audio. I then set it to tv and it only sent stereo audio. The sound card prologic encoder didn't encode the stereo into 5.1.

Again, after turning off DDL so that only 2 channel pcm was sent to my avr, the avr itself was able to enable prologic.

The only thing I can come up with is these games are sending 5.1 channels even if the settings are set to stereo in the game. They must be sending sound to the left and right channel and silence to the others. But it's still sending enough info that my sound card sees all 5.1 channels and won't encode the "stereo sound" into prologic because it see all 5.1 channels.

Does that sound right to anyone? If that's the case, that stinks. There's no options in dragonball to enable surround sound. So the only way for me to get 5.1 prologic for that is to go turn off DDL before playing that game so my avr only sees 2 channels and will enable prologic. The whole reason I went to DDL instead of 5.1 pcm over hdmi is because I hated having to reconfigure my audio device in windows each time I watched a stereo source and wanted to have my avr enable prologic on it. At least with videos, I can watch a 5.1 channel video or a stereo video and my sound card with DDL will either encode the 5.1 and send it, or encode the stereo as prologic and send it, without any intervention from me.

So do games always send 5.1 audio even is the game only is in stereo?

Thanks!
 
Solution
First off, remember that SPDIF simply can't handle an uncompressed 5.1 PCM stream. Secondly, remember you can't invoke Pro Logic on surround audio streams, so it only upmixes audio when a stereo audio stream is sent over.

What it looks like is happening is the games in question are outputting stereo even when you have Windows configured to use 5.1 (which indicates they don't have surround sound support, which I admit is odd in this day and age), then being converted to Dolby Digital format via Dolby Digital Live. However, since your converting a stereo signal, your getting a 5.1 stream with the side channels blank. When the receiver converts back to PCM, it doesn't know there's no audio for the side channels (since DD is a 5.1...
First off, remember that SPDIF simply can't handle an uncompressed 5.1 PCM stream. Secondly, remember you can't invoke Pro Logic on surround audio streams, so it only upmixes audio when a stereo audio stream is sent over.

What it looks like is happening is the games in question are outputting stereo even when you have Windows configured to use 5.1 (which indicates they don't have surround sound support, which I admit is odd in this day and age), then being converted to Dolby Digital format via Dolby Digital Live. However, since your converting a stereo signal, your getting a 5.1 stream with the side channels blank. When the receiver converts back to PCM, it doesn't know there's no audio for the side channels (since DD is a 5.1 format; it just assumes the data is there), so doesn't bother to invoke Dolby Pro Logic to upmix to 5.1, since Dolby Digital is ALREADY 5.1.

The only other thing I can think of is to make sure that in the Sounds tab of the windows Control Panel, that you have "Speakers" [Whatever Soundcard you have] is the default audio output device. I know a LOT of soundcards also have a second item listed specifically for the digital output, but Windows treats all digital SPDIF outputs as stereo by default. Ran into this problem with my Xonar D2 back when Vista first launched; had to enable SPDIF from the driver control panel, not from within the Windows Control Panel, to get 5.1 Dolby Digital Live to work properly.

And yes, it would be nice is receivers were smart enough to be able to figure out how many channels of PCM were being sent over, so you could just enable 5.1 and use HDMI and not have to play games with the number of channels to get Pro Logic working.
 
Solution

blevinsderek06

Honorable
Oct 22, 2013
8
0
10,510
Thanks for the reply!

And just to clarify, I am using SPDIF now and not hdmi. So I cant actually configure windows to use 5.1. It will either send 2 channel PCM or DD. I dont have the options to configure that to 5.1 like I did when I used HDMI.

Maybe I just misunderstood your response, but my question is, if i play a stereo video with DDL, and the option to upmix stereo to Pro Logic enabled, my PC sound card will upmix the stereo into Pro Logic like it should. If Dragonball is actually sending only stereo signal as well, shouldnt it get upscaled into Pro Logic just like any stereo audio source would?

It doesnt though, which is why to me it seems like the game is actually sending 5.1 channels. But they are all silent channels except for the left and right channels. If it was truly sending only stereo, it would actually get upmixed.

Right now, over SPDIF everything gets mixed right except for dragonball which does not have game options for audio format, ie. stereo or surround (and GTA 5 when I change the game setting to stereo). Those are the only 2 games I tested with this.

Over SPDIF with DDL and the Pro Logic upmixer enabled -
5.1 PCM videos convert to DD and play in 5.1 on my speakers. Good
2.0 PCM videos upmix to Prologic and play 5.1 on my speakers. Good
5.1 PCM games convert to DD and play 5.1 on my speakers. Good
2.0 PCM games are NOT upmixing to 5.1 Prologic. Bad

Thats why I think Stereo games are still sending 5.1 audio but just with several silent channels.
 
It depends. I would assume the soundcard would apply Pro Logic, then apply DDL, so yes, I'd assume you'd get 5.1. But I'm not entirely certain that's the case.

Might be a question the guys over at Head-Fi.org can answer. I would assume Pro Logic would work fine and fill in the missing channels for games just as easily as they do for videos.