NS2 Sound Problems

SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
edited February 2013 in NS2 General Discussion
<b>NOTICE: At some stage of development, Hot loading of the DLL fix stopped working. So the listed hot fix below does not work.

I am sure at some stage some development time will be freed for fixing the current Audio issues as of Build 240 at the time of updating this post and some day see OpenAL support.



Please do post your interest in this thread for added support for OpenAL so the devs can see how important is to you.



This very old hot fix for NS2 Alpha still is relevant to other game titles though:


</b>
If you are me then you have had a problem playing music while trying to map now that its grown to a size that kills the FPS.
Low FPS in the editor = Sound stuttering and slowdowns even in other apps while using the editor.


<u>What is happening?</u>
Microsoft made some changes <i>(Removed Hardware Abstraction Layer (HAL) for DirectSound and DirectSound3D)</i> that compromised Direct Sound Support for legacy applications and games that dont use openAL.
This makes your games run sound in <u>Software Mode</u>, You can tell it's running in software mode when you here bad sound glitching, crackling or bad Surround Sound/No EAX Effects.

<u>How to fix?</u>
Depending on your sound manufacturer you either need a Direct Sound DLL placed with along side the games EXE file or some provide an injection method that requires no file copying.
They are needed to tell the game/app how to use Direct Sound under Vista and 7 or even that your sound card supports EAX.


<!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo--><b>Creative SoundBlaster x-Fi & Realtek Users</b><!--sizec--></span><!--/sizec-->
<!--coloro:#9ACD32--><span style="color:#9ACD32"><!--/coloro--><i>Creative Alchemy & 3D SoundBack Beta 0.1</i><!--colorc--></span><!--/colorc-->

You have two options, You can download the Helper Apps from the manufacturers or download the DLL files I have packed for you.

<u>Creative Alchemy</u>: <a href="http://support.creative.com/downloads/download.aspx?nDownloadId=11202" target="_blank">Download Site</a> - <a href="http://www.soundblaster.com/alchemy/" target="_blank">Website</a>
<u>Realtek 3D SoundBack Beta 0.1</u> <a href="http://www.realtek.com.tw/downloads/downloadsCheck.aspx?Langid=1&PNid=24&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false#High%20Definition%20Audio%20Codecs" target="_blank">Download Site</a> - <!--coloro:#C0C0C0--><span style="color:#C0C0C0"><!--/coloro--><i> In Windows 7 you may need to run in Vista Compatability mode.</i><!--colorc--></span><!--/colorc-->

<u>Creative DLL Pack</u>: <a href="http://ns2.unitedworlds.co.uk/online-gaming/directsound.rar" target="_blank">Download</a>
<u>Realtek DLL Pack</u>: <a href="http://ns2.unitedworlds.co.uk/online-gaming/realtek_dsound.rar" target="_blank">Download</a>

<b>Installing Creative and Realtek DLL Pack</b>
Extract the files to the same dir as the <!--coloro:#FF8C00--><span style="color:#FF8C00"><!--/coloro-->editor.exe / NS2.exe<!--colorc--></span><!--/colorc-->

<i>This dll set will work for other games as well</i>
<!--coloro:#C0C0C0--><span style="color:#C0C0C0"><!--/coloro-->Some games like Borderlands or Supreme Commander have it's geme exe in a "SUB" folder called <u>Binaries</u> or <u>Bin</u>, you should put a copy of these files in both that "SUB" folder and the "parent" directory of bin/binaries as some games will step back a folder and find the DLL there instead.
Borderlands might not be a great example, OpenAL fails to initate for me in that game....
I only know this for the Creative DLL's: Most of the time you can tell if it has worked or if there was a problem by looking at the folder where the dll is after launching the game, you should find a log file suddenly appear: dsoundlog.txt, The NS2 editor wont produce a log. In all other cases this helps you tell wich folder the DLL's are actually working in.

I found it works for games as old as Freelancer too.<!--colorc--></span><!--/colorc-->

<i>Games that support openAL do not need the DLL fix
Bioshock
Call of Duty 4
Quake Wars
Battlefield 2 to 2142 & <u>Bad Company 2</u>
<a href="http://connect.creativelabs.com/openal/OpenAL%20Wiki/Games.aspx" target="_blank">Bigger list here</a>
</i>


<!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo--><b>ASUS</b><!--sizec--></span><!--/sizec-->
<i>Gathering Information...</i>
I think they using injection via updated drivers, I cant confirm this though at the moment..

Comments

  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    Bump 4 Helpfulness.
  • simon kamakazisimon kamakazi Join Date: 2009-04-28 Member: 67296Members
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    edited March 2010
    Here is a little more info for your interest.
    Hardware Abstraction Layer (HAL) for DirectSound and DirectSound3D is what has been removed in Vista & Windows 7.

    This means FMOD will do sound Mixing in Software mode in those OS's, Multicore would have to be fully exploited to minimize any problems, With the level of mixing you have already planned there is going to be a bit of a load on the CPU.

    I have soultions from other Sound card manufacturers, I will be updating the first post to include information for Realtek and Asus users in a short while.


    Here is a snippet out of very large atricle that explains some things about what happened (why HAL is gone) between PreVista (XP, 98 etc) and Vista+ (Win7).

    <!--QuoteBegin-"TechPort"+--><div class='quotetop'>QUOTE ("TechPort")</div><div class='quotemain'><!--QuoteEBegin-->Vista includes an all-new audio stack, dubbed the Universal Audio Architecture, which Microsoft wrote new from the ground up with an eye toward improving stability. Windows XP's audio stack ran in kernel mode—the very heart of the OS—making it possible for buggy drivers or other issues to bring down the entire system. In fact, according to 20-year Microsoft veteran Larry Osterman, who worked on the Vista audio engine, "the amount of code that runs in the kernel (coupled with buggy device drivers) causes the audio stack to be one of the leading causes of Windows reliability problems."

    To avoid audio stack-related stability issues, UAA was designed to run in user mode rather than kernel mode, putting it at arm's length from the core of the operating system. If UAA crashes, either due to buggy drivers or other issues, the rest of the operating system shouldn't be affected.

    <!--coloro:#FFA500--><span style="color:#FFA500"><!--/coloro-->An artifact of this new audio stack is the removal of the hardware abstraction layer for DirectSound, distancing the API from a system's sound card. Without a hardware abstraction layer, DirectSound calculations can't be offloaded to an audio chip, effectively killing hardware acceleration for DirectSound. Instead, DirectSound landscapes are pieced together within the UAA's software audio mixer.<!--colorc--></span><!--/colorc-->

    The UAA's lack of a hardware abstraction layer for DirectSound also affects Creative's Environmental Audio Extensions (EAX). Because it's an extension of DirectSound 3D, EAX's access to hardware acceleration has been cut off by the Universal Audio Architecture.

    <!--coloro:#00FF00--><span style="color:#00FF00"><!--/coloro-->Hardware-accelerated audio isn't completely out of the question in Vista, though. Third-party APIs like OpenAL, which doesn't rely on DirectSound, still have direct access to hardware. OpenAL is far less common than DirectSound and Creative's near-ubiquitous EAX, of course, but it's starting to see more widespread support. Bioshock, Call of Duty 4, and Quake Wars all support OpenAL, for example.<!--colorc--></span><!--/colorc--> (Barlows Note: All the Battlefield Series have it too, <a href="http://connect.creativelabs.com/openal/OpenAL%20Wiki/Games.aspx" target="_blank">See this list too</a>.)

    OpenAL has also been used by Creative to port EAX to Vista. The company has released ALchemy software that effectively serves as a DirectSound wrapper, converting DirectSound calls for EAX to OpenAL calls that can then be handled in hardware by sound cards based on X-Fi and Audigy audio chips. ALchemy is a free download for X-Fi owners, but those equipped with older Audigy cards have to shell out $10 for an Audigy version of the ALchemy package. (Barlows Note: Its Actually been made Free now)

    Vista's Universal Audio Architecture hasn't just affected hardware acceleration for DirectSound. The new stack also enables a number of new features, including automatic port detection, per-application volume control, and a protected audio path that allows for a whole new world of insidious Digital Rights Management schemes.<!--QuoteEnd--></div><!--QuoteEEnd-->
  • ExoskelettExoskelett Join Date: 2012-12-18 Member: 175509Members, Reinforced - Supporter
    Justa question - how to configure Alchemy for Natural Selection 2 now?
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    I do not think the loading of the DLL works anymore with NS2.
    Hope some time sooner rather than later that our FMOD version can be upgraded and OpenAL plugin support form FMOD added, This will re-enable Hardware mode for all of using dedicated sound cards or fairly decent on board solutions.
    Some previous attempt has been made fixing full surround sound indefinitely but the in-game voice chat always seems to break, so were not too far off getting the sound fixed..
  • ExoskelettExoskelett Join Date: 2012-12-18 Member: 175509Members, Reinforced - Supporter
    well true it doesnt work atm. - but would be nice if i could use my hardware for what I bought it
  • -WildCat--WildCat- Cape Town, South Africa Join Date: 2008-07-19 Member: 64664Members, Reinforced - Shadow
    SgtBarlow wrote: »
    I do not think the loading of the DLL works anymore with NS2.
    Hope some time sooner rather than later that our FMOD version can be upgraded and OpenAL plugin support form FMOD added

    I would absolutely love this! I have a copy of Rapture3D, which is the best OpenAL implementation I know of and supports HRTFs for headphones. Getting it to work in games that use OpenAL is usually as easy is replacing the the copy of OpenAL32.dll that comes with the game with the Rapture3D DLL.
  • shonanshonan Join Date: 2013-01-28 Member: 182562Members, Reinforced - Shadow
    SgtBarlow wrote: »
    I do not think the loading of the DLL works anymore with NS2.
    Hope some time sooner rather than later that our FMOD version can be upgraded and OpenAL plugin support form FMOD added, This will re-enable Hardware mode for all of using dedicated sound cards or fairly decent on board solutions.
    Some previous attempt has been made fixing full surround sound indefinitely but the in-game voice chat always seems to break, so were not too far off getting the sound fixed..

    Native OpenAL and hardware acceleration support would definitely be awesome!
Sign In or Register to comment.