|
Software & Operating Systems Discussion on Computer Software & Operating Systems |
|
Thread Tools | Display Modes |
2022-04-30, 15:32 | #1 |
Support Technician
Join Date: Apr 2008
Posts: 1,310
Finland
Location: Helsinki
|
Win10 DirectSound3D, positional headphone audio & stuff
Hello!
This is not a question nor is this an instruction. This is just a piece of general information without too much technical details. Someday I might write more technically detailed guide on how to setup a system like what's described here but don't hold your breath waiting that to happen. Feel free to ask and comment if you know more than me, or you want to know more. Ever since I returned to PR in early 2021, I've been trying to setup my gaming audio as good as it's possible in Windows 10. These are some of the things I've done to make PR sound great. That being said, I never liked the sound quality, or lack thereof, of SoundBlaster X-Fi cards nor did I like their clumsy drivers and management software. I actually sold my Auzen X-Fi card when it was still almost new in favor of my current sound card, an ancient Asus Xonar Essence STX. So I have very little experience with EAX 5. Maybe in the distant future when it's properly reverse-engineered and implemented in the software I use, I can finally enjoy EAX 5 in its full glory. Until that happens, this is what I got. One of biggest impact on audio in legacy games was Microsoft's decision to retire DirectSound and DirectSound3D (DS3D). After that there was no more hardware accelerated audio API available, and games had to fall back to inferior software audio. Thankfully, DirectSound is now quite well reverse-engineered and there is a nice piece of software called dsoal that, when dropped in place of the dsound.dll, can emulate pretty much the full functionality of DirectSound and transfer DS3D API calls to OpenAL. When paired with an OpenAL driver named OpenAL Soft, which in turn is capable of doing positional audio for headphones with a method called HRTF (head-related transfer function), this setup gives what I think is the best positional audio that's currently possible with a legacy game like PR running on Windows 10. The HRTF I'm using came from publicly available Ircam dataset (IRC 1043 for those who are interested). Another method to get similar results is to use software called HeSuVi, but on my opinion it doesn't give as crisp and clear result as dsoal + OpenAL Soft does. This is an excerpt from my PR Launcher's support info, showing that "hardare" audio is indeed enabled. Spoiler for Support Info:
Here's a small example of what can be achieved with the setup similar to mine (I use different OpenAL driver). Not my video but this is the one that sparked my interest on the subject. Put on your headphones in normal 2 channel stereo mode, turn off all the possible 3D effects they might have, and listen. You should be able to tell the directions where different sounds come from. Not just side to side but front to back. |
Last edited by bad_nade; 2022-04-30 at 20:08..
|
2022-04-30, 20:38 | #2 |
PR:BF2 Lead Developer
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
Sounds interesting. Maybe you could make a video with PR sounds? I feel vanilla bf2 sounds dont do it justice.
|
Mineral: TIL that Wire-guided missiles actually use wire
|
|
2022-05-02, 11:26 | #3 |
Join Date: Oct 2016
Posts: 365
Iceland
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
Used to be able to use X-FI MB3 software to get full EAX functionality to pretty much any on-board sound card, but Creative took down the activation servers so it's not possible to install it anymore.
I'll definitely take a look at this and see how it works. |
HITREG CARRY |
|
2023-02-02, 07:53 | #4 |
PR:BF2 Lead Developer
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
Bumpy, could you post your settings and maybe setup guide? If this really improves audio, might even add it into Launcher as advanced audio option
|
Mineral: TIL that Wire-guided missiles actually use wire
|
|
2024-02-04, 13:08 | #5 |
Support Technician
Join Date: Apr 2008
Posts: 1,310
Finland
Location: Helsinki
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
I've been away from PR for a while (over a year, actually) but I never gave up the idea of writing more about this. I'll see what I can do. There a couple of problems, though. First one is language barrier. While I can read and write short forum messages in English, writing any kind of technical guide on a language I don't completely understand, is an ovewhelming task. It would be a bit overwhelming for me even in Finnish. Second, I don't truly undestand this Windows & gaming audio either. I consider myself as a nerd, I've been arond computers since forever and I get my living from knowing how to work with an on computers but the whole audio side of computing is mostly black box for me. Lot's of guessing and trial-and-error is what got me here and I still cannot say if its the best possible audio setup for PR. I also might have over-coplicated this for myself, as I always do.
|
Last edited by bad_nade; 2024-02-04 at 17:19..
|
2024-02-07, 21:07 | #6 |
Support Technician
Join Date: Apr 2008
Posts: 1,310
Finland
Location: Helsinki
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
Ok, here we go. Open source virtual headphone surround sound for PR, vanilla BF2 and BF2142. Took me three days just to write the initial version of this post, not counting the numerous post-publish edits.
Mandatory disclaimers
Note: The DirectSound replacement (dsoal) that was mentioned in the first post is not needed at all. OpenAL Soft provides us with all the required functionality, including X-FI emulation with EAX. dsoal is needed when playing legacy games that do not have OpenAL support and only use DirectSound. In PR, vanilla BF2 and BF2142, while dsoal works and can be used, it wouldn't make any difference because sounds need to be routed to OpenAl Soft anyway. Another note: PR Launcher seems to do extra checks related to sounds. Because of that settings that work in vanilla BF2 won't work in PR. For example, I haven't managed to enable X-FI UltraHigh sounds with EAX in PR while it works fine in vanilla. Installing the software Spoiler for Install:
Configuring OpenAL Soft and the HRTF Spoiler for Configure:
Configuring Windows Spoiler for Windows:
Configuring PR Spoiler for Game:
Debugging Spoiler for Debugging:
Glossary Spoiler for Glossary:
HTH |
Last edited by bad_nade; 2024-02-11 at 21:50..
|
2024-02-11, 19:23 | #7 |
PR:BF2 Lead Developer
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
Thanks for the instructions. I tried them and they work for me, but just as you, I have no idea what other registry edits might have impact. I tried a different method where you just add dsound.dll to the root before, but never got that to work.
The audio sounds quite different with this. Most notably everything seems to go quieter more quickly in distance. In tanks the listener obstruction works way better than with default and it is actually hard to hear stuff outside. I also noticed some bugs tho. Mainly the stopping of looping sounds does not work correctly. If you jump out of a vehicle, the engine keeps running for couple of seconds until the loop is completed. |
Mineral: TIL that Wire-guided missiles actually use wire
|
|
2024-02-11, 19:54 | #8 |
Support Technician
Join Date: Apr 2008
Posts: 1,310
Finland
Location: Helsinki
|
Re: Win10 DirectSound3D, positional headphone audio & stuff
To make dsound.dll work, you need dsoal version of it. There are older debug versions on the internet but compiled my own release build from the latest Git commit (52224b17832fda41d02153cf8f56d27cd94bf79a). The file must be placed in the same dir as PRBF2.exe. In addition to the dsound.dll you also need latest oal_soft.dll renamed to dsoal-aldrv.dll sitting in the same directory, and you have to enable Windows dll redirection by creating an empty file named PRBF2.exe.local. Based on my tests the BF2OpenAL.dll needs to be OpenAL Soft version as well. But like I wrote in the previous post, dsound/dsoal is not needed wth BF2.
With either method, plain OpenAL Soft or dsoal + OpenAL Soft, I was able to enable Creative X-FI UltraHigh with EAX in vanilla BF2. But when I tried to enable same settings in PR, launcher started complaining that I don't have hardware support and the Ignore checkbox on the dialog didn't help. No matter which route you take the whole point of this is to get nice positional sound, and to get the best possible results requires some extra work. There are tons of different HRTF/HRIR's listed at https://airtable.com/appayGNkn3nSuXk...oLjoZKWJDnLtTc but so far I've been using only the Listen project created in 2002 - 2003 in France. The Listen project is also referred to as IRCAM, based on the research institue where recordings were performed. OpenAL Soft only provides .def files for four datasets and IRCAM is one of them. http://recherche.ircam.fr/equipes/sa...ten/index.html The idea is to listen all demo sounds using the same stereo headset you use for gaming, and pick the one that provides the best positional experience. Then you need to download the HRIR package matching the sample sound ID number from IRCAM's FTP site, extract it, create a .def file for that HRIR and finally convert it to OpenAL Soft HRTF format using makemhr.exe. For someone proficient with computers this is quite straightforward yet laborious task. You also need an FTP app to download demo sounds and HRIRs because all modern browsers have dropped FTP support altogether. For creating the .def file, OpenAL Soft includes IRC_1005.def file as an example for IRCAM HRIRs. The IRC_1005.def file needs to be renamed and its content edited to match the sample number you selected earlier. Instructions are in the file. For other datasets listed on the Airtable page there are no .def files which means they cannot be used with OpenAL Soft. I've been contemplating on learning how to create makemhr-compatible HRIR def file for an arbitary SOFA file but haven't had any time or energy for that yet. Spoiler for Screenshots:
|
Last edited by bad_nade; 2024-02-11 at 21:32..
|
|
|