How To: Realtime AC3 / Dolby Digital Encoding for Games

This simple how perhaps might be useful to those who are connecting their sound card to a receiver that doesn’t have analog input (like me for example) and using the Matrix Decoder on your receiver doesn’t sounds as good as using a Dolby Digital / AC3 encoded files. So what this simple how to trying to achieve is to do a realtime AC3 Encoding using software (in other word, using your CPU power to perform realtime Dolby Digital encoding) and then deliver that Dolby Digital / AC3 encoded material to your receiver. Although unfortunately it doesn’t come for free

Before i begin, please note that this tips is intended for use in Gaming only (or perhaps listening through your MP3/MP4s collection if you’re not using a music player that support realtime Dolby Digital Encoding from a plugin, like Winamp for example). Because for movie and music listening purpose the process is much simpler plus there’s no latency problem like this and you don’t need to spend money (unless you want to donate for the project) .. but i’m not going to describe the process for movie and music listening purpose here because as the title says this is for games :)

If you’re currently using below setup, then chances are you don’t need to spend $30 USD to get a realtime AC3 Encoder / Dolby Digital Encoder. But i haven’t tested it yet because i don’t have the required hardware

  • If your sound card belong to the Creative Audigy Series

    Then you can try using redocneXk combined with Creative ASIO Driver or KX Driver. As the documentation itself can be found here
  • If you have the new Creative X-Fi Series (a much better option for X-Fi series)

    Then you can spend $4.72 USD, and get the Dolby Digital Live and DTS Connect Pack from Creative Store

Otherwise, if your setup doesn’t match above configuration then unfortunately you’ll need to spend $30 USD for a software that is required for this purpose BUT if you don’t mind on spending more money and prefer to skip all this together, you can just buy Diamond Multimedia Xtreme Sound 7.1 DDL (equipped with Dolby Digital Live feature, which is unfortunately not available on where i live because there are no distributor for it here according to the official website) if you prefer a cheaper alternative to X-Fi (at least for me)

Anyway here are the steps:

Required Software

  1. Virtual Audio Cable ($30 USD): Link

    Trial version available with some limitation like female voice reminder each several seconds

  2. AC3Filter (freeware and open source): Link
  3. GraphStudio (freeware and open source): Link

Let’s begin

  1. Install VAC (Virtual Audio Cable) and AC3Filter (GraphStudio don’t need to be installed, you can place it anywhere you like)
  2. Run VAC Control Panel from Start Menu and make it look like this

    Virtual Audio Cable Control Panel

    You’re free to adjust the sample rate and also bps. As for the Number of channels, read the special note at the bottom

  3. Now run AC3Filter Config from Start Menu and make it look like below

    AC3Filter Configuration - Main Tab

    If your source sample rate isn’t 48000 you need to set the Output Format rate to 48000 (i already configured it to always deliver 48000Hz so i don’t need to set it in AC3Filter) or you can just set the AC3Filter sample rate to 48000

    AC3Filter Configuration - Main Tab

    Note: You should adjust the bass redirection frequency according to your Sub Woofer capability as described in the manual and feel free to adjust everything on this section to your liking

    AC3Filter Configuration - SPDIF Tab
  4. Now make sure that Virtual Cable is configured as default Playback Device in Windows ( open Windows Control Panel and then choose sound )
  5. And then run GraphStudio and then choose to add new filter (you can press CTRL+F for shortcut) and add:

    1. Virtual Cable 1 from WDM Streaming Rendering Device because it provides much better latency instead of the normal Virtual Cable Line that needs to be adjusted everytime before you connect it to AC3Filter
    2. AC3Filter from DirectShow Filters to upmix the stereo channel into 5.1 AC3 / Dolby Digital
    3. DirectSound: [ Your Sound Card Name Digital Output ] from Audio Renderers. Where your sound card name is your physical Sound Card Name (mine is Realtek Digital Output)
  6. Finally connect each filter so it’ll look like below image for an example ( Virtual Cable 1 ADC ’ AC3Filter ’ DirectSound: [ Your Sound Card Name ] )

    GraphStudio
  7. Now to make things easier for future access, you should save the graph you’ve created in GraphStudio so you can just load your graph in the future for easy access
  8. Now click the Play button on GraphStudio … and see whether the Dolby Digital indicator on your receiver is activated. If you can see Dolby Digital indicator on your receiver that mean everything is done. So try playing one of your game to test it

But please keep this in mind, in order to use this realtime ac3 encoding in the future, you’ll always need to launch GraphStudio first and then choose the play button on GraphStudio, or else it’s not going to work

Credits goes to the poster at AC3Filter Forum because without his post, i would have to get a X-Fi card which is … well … i’m not sure on when i can get it :)

Special Note

As a side note, upmixing like this may result in lower sound quality (perhaps if you can notice it). Also there’ll be latency problem (noticeable). So for certain games (such as Pro Evolution Soccer 2011) i choose to disable realtime ac3 encoding. But for games like Assassin’s Creed Brotherhood and Need for Speed Shift 2 Unleashed, it sounds great to me :D

And to those who are wondering, on why i didn’t set the number of channel to 5.1 (6 Channel) in Virtual Audio Cable Control Panel and Virtual Audio Speakers Configuration in Windows Sound Control Panel under Playback Device and Recording Device. The reasons are:

  1. If i set the VAC Number of Channels to 6 in VAC Control Panel (and configure VAC Speakers Configuration under Windows Sound Playback Device to Stereo plus change the Windows Sound Recording Device for VAC to 6 channels). All the sound levels outputted are equal which means Front Left (FL), Front Right (FR), Front Center (FC), Back Left (BL), Back Right (BR), and Subwoofer (SW) at the same level (can be seen in AC3Filter) which is wrong (i think, but since i’m not audio professional, please ask your nearest audio professional). But if you prefer it that way you can just change the Recording Device in Windows Control Panel for your VAC device to 6 channels and keep the Playback Device for your VAC device to Stereo
  2. If i set VAC Number of Channels to 6 and change both Playback and Recording device under Windows Control Panel to 6 channels … i get an error message about DirectShow Problem (can’t create buffers, when tested using Winamp)

And because of that reason, i guess it’s better to upmix it from Stereo to 5.1 AC3 / Dolby Digital :)

Leave a comment

Comments

  1. Axel Dec 31, 2013 at 10:45 PM

    Hello,

    do you have an idea where I can use 6 or any channels for direct input without mix-down or similar?

    I would like to use straight multichannel live output via S/PDIF (AC3) e.g. Cubase and similar. I could use VAC with more virtual connections.

    I have a ‘older’ receiver (Yamaha RX-V559) with total of 7 channels (FL+C+FR, SL+SB+SR and LFE). (Dolby Digital EX, DTS-ES DISCRETE 6.1 output).

    Thanks in advance.

    PS: This tutorial is a little out of date, but it still works.

    • Axel Apr 6, 2014 at 10:00 PM

      Analog can send six channels via ASIO4ALL, works with Cubase (6), Mixxx and some other applications that use ASIO (ASIO4ALL).

      In Cubase you can set for each track a own channel output. If you have a sound card with total 8 channels, you can use it. With 6 channels is it possible too. Your receiver must have 6 or 8 input channels via cinch (analog).

  2. Lorenzo Dec 8, 2013 at 8:22 AM

  3. bob ross Apr 11, 2013 at 2:29 PM

    I was playing around with this and while I’m not going to buy virtual cable, I did put in my xfi platinum card. I can’t use the alt drivers, but graphstudio will use my sound card as a audio source. I can connect its output to my ati video card, and play audio from the creative card to the ati card. I tried using ac3filter to mix it but I only get 2 channel, maybe 3. rear are mixed with front. I think if i buy the creative connect DDL I can patch the hardware coded sound to my ati card and I can finally play my games in surround sound on the big tv. wish me luck… maybe someone else will have better luck connecting a hardware ddl card to video hdmi with ac3 intact.

  4. dennis Oct 6, 2012 at 7:42 AM

    fro me the same i read and then i cant read any more of solusion?

  5. dennis Oct 6, 2012 at 7:37 AM

    and how do you set Line 1 ( virtual cable as ADC ? i onley get master volume Line 1(virtual audio cable )
    And i dont get the arrows like yourse or collors like yours so how to activate that ?

  6. Jorgos Nomikos Sep 21, 2012 at 10:26 PM

    Thanks for the amazing tutorial!
    It works perfectly on my VIA Integrated HD SPDIF Motherboard output!
    Rocking now with Battlefield 3 :D

  7. Thomas Sep 1, 2012 at 12:16 PM

    Hey, great topic! Took a bit of extra finagling to get it to work in Skyrim, but I now have full 3d surround sound! The trouble is the lag :( I’ve played around with a few settings, dropping the bit rate to 128 and setting the priority of the specific processes hosting the services (svchost etc) to real time, but I’m still getting an unacceptable lag. My SPDIF doesn’t support less than 48000khz so I can’t drop that without the output coming out in PCM. I still have nearly a full second in lag! What else can I change that can help drop my lag down?

    I’m running an Athlon X2 @ 2.6ghz with 6gb DDR2, 64gb SSD primary, and GeForce 570. Yes, my CPU is the holdup in my performance all around :(

  8. Alfredo Jul 27, 2012 at 2:08 AM

    its work for me :) but i have one problem, when i press the play button in “Graphstudio”, i hear every six seconds a message, saying “TRY”, how i can mute this ?

    PD:everything else is ok.

  9. RP Jul 5, 2012 at 2:37 AM

    I downloaded these apps today and ACFilter config did not have the option in your second+ picture… the 3/2+SW5.1Channels option is not available. I see no options with “SW” in the name… all 3 apps were installed before opening the AC3 config. Any idea what the issue may be? Please respond to email I might not check back here after a few days… Thanks.

    • Reaper-XReaper-X Jul 5, 2012 at 7:01 AM

      Apparently there’s a new version of AC3Filter available for download now, i thought the development was ceased long time ago. Anyway actually it’s just the name and the position of the items that has been changed

      1. The 3/2+SW 5.1 Channel = 5.1 Surround Output Format at the main tab
      2. The bass redirection is at the Gains tab

      The rest are pretty much the same

    • RP Jul 5, 2012 at 7:10 AM

      I think they renamed 3/2+SW to “5.1 Surround” assuming “SW” was subwoofer. Now, almost at the end of it I ran into one more problem. In step 5/1 when the Virtual Cable 1 is added but the box display does not have all the connectors it has in your picture. On the left are ADC and Volume, on the right side is just Capture and DAC…

    • Reaper-XReaper-X Jul 5, 2012 at 2:12 PM

      Use Capture pin, note that if you didn’t use WDM, before connecting make sure to double click on it (on the pin) to see the properties and reduce the latency (can’t remember its exact name because in this example above i’m using WDM that offer low latency albeit still noticeable on some games)

  10. Alexis Jun 26, 2012 at 12:55 PM

    This was kind of confusing for someone like me who doesn’t know much about audio. I quit after a while and just got a sound card with Dolby Digital Live and DTS interactive…

    • Reaper-XReaper-X Jul 2, 2012 at 7:40 AM

      Actually that’s a lot better option than using the method described here provided that you have the money and the hardware is available near your location because of the latency issue that can be noticed by using this method and probably can’t be noticed if it’s being encoded by the hardware (i think the encoder are hardware based but i could be wrong)

      Or you can always use Analog Speakers for gaming only while for movies and music purpose you can send it through SPDIF (by doing realtime Dolby Digital encoding using another method which is simpler and no noticeable delay)

  11. L2P Apr 8, 2012 at 10:58 PM

    Dude, I finally got this to work, but the sound is like a second delayed. Could anyone help me?

    • L2P Apr 9, 2012 at 7:33 PM

      I mean like when i play games like counter strike it is impossible to use the sound because it is way too delayed. Is there any way for me o get 5.1 on CS without that enourmus delay, what do i have to do? Thanks for the post btw, it really solved some problems:)

    • Reaper-XReaper-X Apr 11, 2012 at 6:53 PM

      I’m sorry for the delay in response, as for your question, unfortunately there’ll be a delay by doing this (as i said on the article). But depending on the games you’re playing, the delay might not be noticeable. So the only solution is you have to turn off the realtime ac3 encoding for that specific games

  12. Jack Jan 31, 2012 at 12:25 AM

    Hey, im trying to get this guide to work with the Logitech G930 the guide on how to do that is found at http://forums.logitech.com/t5/Headphones-Headsets-Microphones/Get-your-G930-to-work-on-and-with-Xbox-360-and-PS3/td-p/518631. However I cant seem to combine your guide with this one. I have a P7P55D Deluxe mobo and have the xbox connected to it via optical. Any ideas on what im doing wrong?

    • Jack Feb 1, 2012 at 12:26 AM

      Update, I didnt have an optical in port. Now I do all I hear is like..loud clicking noises in the headset with occasional patches of sound I have it set up as. Virtual Cable 1 ADC ’ AC3Filter ’ DirectSound: Logitech G930

    • Reaper-XReaper-X Feb 2, 2012 at 7:47 AM

      Sorry i didn’t notice that you posted comments here as well but because you’ve already contacted me via email i believe i don’t need to post the reply here again :D

  13. pocholo Dec 21, 2011 at 4:39 PM

  14. James Dec 7, 2011 at 11:48 AM

    “And because of that reason, i guess it’s better to upmix it from Stereo to 5.1 AC3 / Dolby Digital :)”

    But then we are not experiencing a really 5.1 sound in games, and a upscaling 5.1 stereo, like some home theater does…

    • Reaper-XReaper-X Dec 8, 2011 at 12:24 PM

      Yes you’re correct but even if it’s not true 5.1 due to upmixing but it sound better for me rather than using the matrix decoder from the receiver (your preference might differ). As described in the special note, i’ve tried to get games and movies with Surround Sound to output it’s surround sound to VAC then chain it to AC3Filter to be encoded as surround AC3 without upmixing, but couldn’t get it working

  15. Leolulz Sep 4, 2011 at 12:11 AM

    Hi. I did exactly as the steps told me to do. But in the last steps about Graph Studio i got a couple of problems. I saw a few comments right under that’s pretty similar i think but it could’nt help me.

    The ADC pin and Volume pin is on the LEFT side of the Virtual Cable 1 block, Capture and DAC on the RIGHT side of the block. So i can’t attach the ADC to the AC3Filter.

  16. computer zone Aug 24, 2011 at 4:14 PM

    nice blog , ngiler saya bos lihat webnya yahuud

  17. Ben Aug 7, 2011 at 3:39 AM

    I followed this tutorial closely but when I got to the Graph Studio Part every time I try to make an arrow from the ADC to In or the Out to Audio Input Pin it never works and the arrow dissapears. I’m using windows 7 64 bit and I tried running as administrator, what did I miss?

    • Reaper-XReaper-X Aug 10, 2011 at 10:51 AM

      From your description it seems that the arrow won’t connect at the Virtual Cable 1 -> AC3Filter part

      If that’s the case try double clicking the AC3Filter in GraphStudio, and then under System Tab (In AC3Filter) make sure that PCM is Selected and then try connecting the ADC to AC3Filter again

      Also, actually i’m using Windows 7 64-bit (and the guide is created on W7 64). It may not look like it in the screenshot, but that’s because i’m the type that always use the classic Windows look since Windows XP era because of it gives much larger space than using Aero, and also i don’t like to waste processor and memory for unnecessary eye candy … lol

  18. Snaksolid Jun 20, 2011 at 11:04 AM

    I’m having the exact same problem as alex with the dac and capture with no adc. could someone please help me?

  19. Alex Jun 6, 2011 at 4:59 AM

    Scratch that, figured it out! Just need to buy VAC, cos it keeps gong, ‘trial’! :p

  20. Alex Jun 6, 2011 at 4:47 AM

    Hi, I’ve been trying to follow your instructions, but I can’t seem to do it! First, my Virtual Cable filter looks different to yours (only says ‘Capture’ and ‘DAC’). Secondly, I can’t get them to string together? Am I doing something obviously wrong? I’m trying to get AC3 to work through iTunes (to redirect my bass!). Thanks!

  21. Tapo Jun 4, 2011 at 2:34 PM

    Hey, great write up!

    I’m using this to channel all sound; music along with gaming, and managed to prevent audio quality loss:

    For my system setup [hdmi -> tv -> optical out to 5.1], I can increase the BPS from 16 to 24, and set AC3 to use 24bit. This prevents any audio loss that I had initially [easily discerned switching between audio default devices].

  22. Kyle Tuite May 7, 2011 at 2:30 AM

    Aw yeah good to see you’re writing again! Glad to have to have you back Reaper!

    • Reaper-XReaper-X May 8, 2011 at 12:03 PM

      Thank you very much Kyle :) … although i still need to get back on track first because it has been a long time since the last time i write :D

  23. Michael Apr 27, 2011 at 6:45 AM

    Thanks, nicely laid out! I have followed your setup with some success – the Dolby Digital indicator does indeed activate, but only the stereo L and R speakers activate/receive sound. Setting the game to output 5.1 (changed from stereo) makes no difference. Any ideas?
    Thanks again for the post.

    • Reaper-XReaper-X May 8, 2011 at 11:48 AM

      I’m really sorry Michael, i didn’t notice until today there’s a comment posted here :(

      As for stereo output, actually i forgot to include the mixer options into this post (post updated at the ac3filter part). If you want 5.1, go to the mixer tab in ac3filter and configure to expand stereo and surround and finally adjust the bass redirection according to your subwoofer manual). In my case, the bass redirection / cut-off frequency is set to 60 (better bass in my opinion for my sub) :)

To reduce spam, if you're posting comment for the first time, it'll be moderated first. And if they aren't spam, subsequent comments will appear automatically. Also you may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>