Page 1 of 3

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 2:45 pm
by Danial Zachery
Hi guys.

This is something I've been working on, on and off, for quite a while. Finally, it's at the point where I have something to show for Windows users.


About

This is a project that attempts to implement dsound.dll using OpenAL. It does so in a way that makes the application think it has accelerated audio even when no audio acceleration is present, which causes games like Oblivion and Morrowind to use the DirectSound3D interfaces instead of doing its own stereo mixing. Some implementations of OpenAL are able to do surround sound mixing in software, which in turn causes the DS3D interfaces to play in surround sound. Additionally, software OpenAL implementations tend to support the EFX extension, which can be used to implement the EAX interfaces.

What this ends up doing is, it allows Oblivion to use surround sound output, and allows the use of EAX for mods like http://www.tesnexus.com/downloads/file.php?id=17050 http://www.tesnexus.com/downloads/file.php?id=32128, without the need for audio acceleration. Since audio acceleration is not used, that means it also works on Windows Vista and 7 regardless of your audio capabilities.

Sme things to keep in mind:
  • Because this implements dsound.dll using OpenAL, the OpenAL implementation must not use DirectSound itself. I provide an implementation which uses WASAPI/MMDevApi and WaveOut/WinMM.
  • The provided OpenAL implementation only supports mono and stereo when using WaveOut (sorry XP users). Mono, stereo, quad, 5.1, 6.1, and 7.1 are possible with WASAPI. EFX works regardless.
  • This was primarily developed for use with, and tested under, Wine. Besides the fact that I use Linux, this made it easier to avoid the DirectSound restriction since dsound.dll could call directly to the host OpenAL lib which would not use DirectSound. The OpenAL implementation has since added support for playback using non-DirectSound APIs on Windows, which is what makes this possible.
  • This has not been tested under real Windows, but the real Win32 DLLs have been tested using Wine's MMDevApi implementation.
  • The DirectSound DLL is not complete, particularly where EAX is concerned. However, enough is done that Morrowind and Oblivion (along with the EAX plugin) work.
  • It can be picky about the OpenAL implementation it uses. Beyond the DirectSound restriction, I try not to make it dependent on any particular one, but I can't guarantee any other will work.


It's entirely possible this build won't work when put into real Windows. It could fail to start, crash, lock-up the app, lock-up your system, crash your system, kick your puppy, or shave your cat. Such is the consequence for being a work-in-progress. If you do have any trouble, feel free to report it and I'll do what I can (please make sure to provide your system specs, Windows version, audio configuration as set in Windows, and the output of the openal-info.exe program when run next to the provided OpenAL32.dll). I also can't guarantee this will work with the Steam version.


Download

Since this isn't strictly a TES mod (though TES is primarily why I developed it), the usual mod sites don't seem appropriate. I'll put it up on TESNexus if you think it is appropriate, but I won't presume such. It also seems ompldr.org is down, so for now, I've put it up on my webspace:
http://kcat.strangesoft.net/dsoal.zip


Installation

Extract the DLL files from the package and place them in the same folder as Oblivion.exe. As with OBSE, you may need to disable whatever protections Windows has on your Oblivion folder. You may also need to modify Oblivion.ini so that it will attempt acceleration again:
[Audio]bDSoundHWAcceleration=1bUseSoftwareAudio3D=0

Then run Oblivion as normal.


Final Notes

The sources for dsound.dll are provided in the package. The readme in the package explains where to get the sources for OpenAL32.dll/openal-info.exe and libwine.dll.
Being that this is software-driven, there may be a slight impact on performance. I don't notice any FPS impact on my AMD Athlon X2 4200+, but it's something to keep in mind if you have something lesser.
The OpenAL DLL requires an i686 CPU with MMX and SSE. I believe this is similar to Oblivion itself.


Thanks for looking! :foodndrink:

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 11:33 am
by MatthewJontully
Question: doesn't the game (on Windows XP) already work with surround sound and EAX? And EAX is, I believe, only available with a Creative Soundblaster soundcard, which for Windows 7 (and presumably Vista too) already provides ALchemy as a free download, which when run will automatically detect an installation of Oblivion and install a dsound.dll file into the directory, restoring surround sound and EAX to the game for you.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 11:42 am
by stephanie eastwood
Yes, Creative Alchemy does this. I have a dsound.dll file in my Oblivion (above Data) folder already that restores stereo sound and EAX capabilities. Without it the game wasn't able to play anything but the opening menu title music.

This audio mod may not be needed in many cases in Windows, but it's certainly a great thing for the many linux users I know this community has.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 10:30 am
by Damned_Queen
Question: doesn't the game (on Windows XP) already work with surround sound and EAX? And EAX is, I believe, only available with a Creative Soundblaster soundcard, which for Windows 7 (and presumably Vista too) already provides ALchemy as a free download, which when run will automatically detect an installation of Oblivion and install a dsound.dll file into the directory, restoring surround sound and EAX to the game for you.

Oblivion on Windows XP can use surround sound and EAX, if you have audio hardware capable of it (ie, if you have audio acceleration). Non-Creative cards do (sometimes) implement EAX 2.0, though you don't really see proper implementations of EAX 4.0 or 5.0 outside of Creative's cards. With ALchemy on Vista/7, it requires OpenAL hardware drivers.

This project does all the processing in software. It doesn't matter what you have (eg, cheap integrated audio chips), as long as you have something that can play a stream of audio, it will still work.

If you have ALchemy working and providing DirectSound acceleration, this may not really do much for you. But as dedicated audio hardware is becoming much less common, fewer people have that option. Linux and OSX users have never had the option. This is an attempt to enable/restore it for everybody. Plus, it helps that it's all open source, so anyone can look at it and improve it.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 11:37 am
by DAVId MArtInez
What exactly does EAX provide for oblivion? I have an X-fi card with 5.1 setup. I typically use Audio Creation mode with bit-matching playback and I still get directional sound without ALchemy. The only difference I have noticed with switching to Game mode, is that I can use CMSS, which only affects the music to use more than front L/R.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 10:22 am
by Prisca Lacour
I actually have a running water bug that will crop up if I enable hardware acceleration. I've had that bug for years - going all the way back to my original Oblivion install on my old machine. Basically I've got on-board sound. Would you happen to know if that bug will resurface if I install your software and enable hardware acceleration? I guess I'll have to try it, but I'm just wondering if you have any thoughts on that.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 10:23 am
by Joanne
What exactly does EAX provide for oblivion? I have an X-fi card with 5.1 setup. I typically use Audio Creation mode with bit-matching playback and I still get directional sound without ALchemy. The only difference I have noticed with switching to Game mode, is that I can use CMSS, which only affects the music to use more than front L/R.

By itself, Oblivion won't use EAX. There is http://www.tesnexus.com/downloads/file.php?id=17050 to expose EAX controls through script functions, though, and http://www.tesnexus.com/downloads/file.php?id=32128 that will actually use it. It results in something http://www.youtube.com/watch?v=COqg8bkk1Eg.

What Windows version do you have? If you have XP, then Oblivion likely doesn't have a problem using acceleration directly. ALchemy just routes DirectSound to hardware OpenAL devices, using a blacklist or a whitelist to avoid the circular dependency problem, so if you already have DirectSound acceleration, ALchemy won't add all that much.

I actually have a running water bug that will crop up if I enable hardware acceleration. I've had that bug for years - going all the way back to my original Oblivion install on my old machine. Basically I've got on-board sound. Would you happen to know if that bug will resurface if I install your software and enable hardware acceleration? I guess I'll have to try it, but I'm just wondering if you have any thoughts on that.

What is the 'running water bug'? I'm unfortunately not familiar with it, and can't hazard a guess without knowing a bit more about it.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 6:59 am
by Tracy Byworth
This looks pretty interesting to me, considering I have an integrated sound setup.

I am on Win 7, what will I need to experience EAX goodiness, in addition to this mod? Will I also have to install side's EAX mod?

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 3:48 am
by Eire Charlotta
What is the 'running water bug'? I'm unfortunately not familiar with it, and can't hazard a guess without knowing a bit more about it.


A bug that drove me completely and absolutely nuts since, being a woman, the sound of running water had some rather annoying consequences :rofl: Basically as my PC ran around in the game, I would suddenly hear the sound of running water, even if there was no water nearby. Between Bethesda tech support and some people on the forums here, we determined that it was because I had hardware acceleration turned on. I guess there was a sound effect that the game was trying to play and that got misinterpreted and I would get the sound of running water instead. Also, once it started, it wouldn't stop for quite a while. Often I would have to exit the game to get it to stop. Turning off hardware acceleration now means blissful silence. My current motherboard is an ASUS Striker Extreme II, which comes with an Supreme FX II audio card. It's capable of 8 channel audio. So I'm basically trying to figure out if your program will help any or if my setup already supplies what your program offers...

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 12:50 pm
by Suzie Dalziel
By itself, Oblivion won't use EAX. There is http://www.tesnexus.com/downloads/file.php?id=17050 to expose EAX controls through script functions, though, and http://www.tesnexus.com/downloads/file.php?id=32128 that will actually use it. It results in something http://www.youtube.com/watch?v=COqg8bkk1Eg.

What Windows version do you have? If you have XP, then Oblivion likely doesn't have a problem using acceleration directly. ALchemy just routes DirectSound to hardware OpenAL devices, using a blacklist or a whitelist to avoid the circular dependency problem, so if you already have DirectSound acceleration, ALchemy won't add all that much.


I use Windows 7. I understand that DirectSound was scrapped with Vista. Too bad... EAX was a neat feature. But than again I hear that OpenAL has a lot more potential. It's a shame that surround sound setups are not common.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 4:23 am
by how solid
So how does http://www.tesnexus.com/downloads/file.php?id=14472 compare? I got it a while back but never tried it out for some reason.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 7:06 am
by TASTY TRACY
I see people say Oblivion doesn't Use EAX by Default..? If by EAX you mean positional Audio. Then I have to say I have not added a thing to my install to get it working. I am on Win 7 x64 works great. Turn head sound moves from one speaker to the next. Spin a 360 and use all surround speakers. Bad guy behind me I hear it in the rear speakers.

Stock Drivers for my ASUS Zonar D2 . with 5.1 Z5500, 500 watt RMS (1000 peak) This sounds WAY better than the creative card it replaced. (was so sick of driver crashes).

Back in the Day on Win XP this also worked out the Box with a creative card. Windows messed this all up.

Kudos to you for actually getting windows to actually work with this....I am sure my card is also doing tricks to make it work but work it does!!

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 7:58 am
by u gone see
This looks pretty interesting to me, considering I have an integrated sound setup.

I am on Win 7, what will I need to experience EAX goodiness, in addition to this mod? Will I also have to install side's EAX mod?

With the DLLs installed, you need the Oblivion EAX plugin for OBSE, and Side's EAX Control. With everything in place and Side's mod enabled, it should then "Just Work".

A bug that drove me completely and absolutely nuts since, being a woman, the sound of running water had some rather annoying consequences :rofl: Basically as my PC ran around in the game, I would suddenly hear the sound of running water, even if there was no water nearby. Between Bethesda tech support and some people on the forums here, we determined that it was because I had hardware acceleration turned on. I guess there was a sound effect that the game was trying to play and that got misinterpreted and I would get the sound of running water instead. Also, once it started, it wouldn't stop for quite a while. Often I would have to exit the game to get it to stop. Turning off hardware acceleration now means blissful silence. My current motherboard is an ASUS Striker Extreme II, which comes with an Supreme FX II audio card. It's capable of 8 channel audio. So I'm basically trying to figure out if your program will help any or if my setup already supplies what your program offers...

Hmm, well a quick look on Google seems to suggest the Supreme FX II isn't all that great of a card. It's possible the problem was due to faulty drivers, in which case this should not run into that problem.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 2:17 am
by Margarita Diaz
I see people say Oblivion doesn't Use EAX by Default..? If by EAX you mean positional Audio. Then I have to say I have not added a thing to my install to get it working. I am on Win 7 x64 works great. Turn head sound moves from one speaker to the next. Spin a 360 and use all surround speakers. Bad guy behind me I hear it in the rear speakers.

Stock Drivers for my ASUS Zonar D2 . with 5.1 Z5500, 500 watt RMS (1000 peak) This sounds WAY better than the creative card it replaced. (was so sick of driver crashes).

Back in the Day on Win XP this also worked out the Box with a creative card. Windows messed this all up.

Kudos to you for actually getting windows to actually work with this....I am sure my card is also doing tricks to make it work but work it does!!


No, Oblivion doesn't use EAX by default. Few games do nowadays. EAX is environmental sound processing. It's not positional sound. EAX adds things like reverb, echo, etc. to enhance sound effects.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 10:22 am
by Matt Bigelow
Hmm, well a quick look on Google seems to suggest the Supreme FX II isn't all that great of a card. It's possible the problem was due to faulty drivers, in which case this should not run into that problem.


Great thanks! I think I'll check it out. Thanks for the help.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 10:52 am
by Lexy Dick
No, Oblivion doesn't use EAX by default. Few games do nowadays. EAX is environmental sound processing. It's not positional sound. EAX adds things like reverb, echo, etc. to enhance sound effects.

Ahhhh....duh....my bad...gonna give this a go and see if I can hear a differance. The Asus card says it has EAX also.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 7:26 am
by Samantha Mitchell
So how does http://www.tesnexus.com/downloads/file.php?id=14472 compare? I got it a while back but never tried it out for some reason.

I've not tried Soundscaper, personally. From what I understand, compared to Side's, it's not as accurate, relies on another mod (You Are Here), and seems to be older. I can't say how good it is or not, though.

I see people say Oblivion doesn't Use EAX by Default..? If by EAX you mean positional Audio.

No, by EAX I mean the echos and reverb applied to sounds in real-time, which Oblivion doesn't have by default. The positional audio is supported with the game's software mixer, if limitedly.
Already answered.

I am on Win 7 x64 works great. Turn head sound moves from one speaker to the next. Spin a 360 and use all surround speakers. Bad guy behind me I hear it in the rear speakers.

Stock Drivers for my ASUS Zonar D2 . with 5.1 Z5500, 500 watt RMS (1000 peak) This sounds WAY better than the creative card it replaced. (was so sick of driver crashes).

Back in the Day on Win XP this also worked out the Box with a creative card. Windows messed this all up.

Kudos to you for actually getting windows to actually work with this....I am sure my card is also doing tricks to make it work but work it does!!

I believe the Zonar has support for OpenAL, and IIRC it has its own DirectSound->OpenAL layer, too. Or maybe I'm confusing that with Realtek. Now you've got me curious if Oblivion's software mixer does support surround sound, and something else was preventing it from working for me.

But in either case, this also adds EAX into the mix, along with some nice bit of http://repo.or.cz/w/openal-soft.git/blob/HEAD:/alsoftrc.sample.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 12:02 pm
by sunny lovett
With the DLLs installed, you need the Oblivion EAX plugin for OBSE, and Side's EAX Control. With everything in place and Side's mod enabled, it should then "Just Work".


Thanks for the answer. :)

I've asked the moderators to add a [RELz] tag to the thread title to draw more attention to this thread.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 11:40 am
by Pants
I've asked the moderators to add a [RELz] tag to the thread title to draw more attention to this thread.

Thanks. :)

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 1:37 am
by Kayla Keizer
Installed this, along with the two EAX mods. My game didn't spontaneously combust and it sounds pretty cool in-game, only played a while but no issues so far. Good job. ^_^

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 2:13 am
by Jesus Lopez
Installed this, along with the two EAX mods. My game didn't spontaneously combust and it sounds pretty cool in-game, only played a while but no issues so far. Good job. ^_^

Cool, thanks. :)

I'm currently trying to implement the EnvironmentSize parameter (it's currently ignored), which is being unexpectedly tricky. EFX doesn't have a direct equivalent since it's more of a meta-parameter... changing it just changes the other parameters, and doesn't do anything directly itself. It's unnecessarily difficult to find the relationship between them.

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 8:46 am
by Becky Palmer
Oh my god I'm so relieved, I thought I had to reinstall. I had spent ages looking for which mod f'd up my game and I forgot about this one.

Anyway, this dropped my FPS to 10 in every situation including a new game on lowest settings. Be very careful when using it. Windows 7 Ultimate, sound card is onboard.

Here is the output http://img1.uploadscreenshot.com/images/orig/5/13815530286-orig.jpg

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 8:16 am
by Honey Suckle
Oh my god I'm so relieved, I thought I had to reinstall. I had spent ages looking for which mod f'd up my game and I forgot about this one.

Anyway, this dropped my FPS to 10 in every situation including a new game on lowest settings. Be very careful when using it. Windows 7 Ultimate, sound card is onboard.

Erk. Sorry about the trouble. :(

What CPU do you have, and what is your audio configuration like (speaker config, the default format set in the device's properties in the control panel, etc)? Is that a 32-bit OS or 64?

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 12:41 pm
by Nick Jase Mason
32bit OS.
The active headset in the screenshots is a USB headset.
http://img1.uploadscreenshot.com/images/orig/5/13816335962-orig.jpg

[RELz] Restoring Surround Sound and EAX

PostPosted: Wed Mar 30, 2011 8:59 am
by Star Dunkels Macmillan
Hmm, maybe something to do with it being a USB device. Did you happen to notice if the sound was stuttering or laggy?

If you don't mind trying, can you switch to the other "Speakers" device (the High Defintion Audio one), setting that as the default and seeing if the problem persists?