How to enable BF2 true surround sound for Vista/Win7 (this shouldn't matter for X-Fi)
I'm posting this because I came across this thread as part of my research into the title's intent. And it is related to the original subject.
So, in case the same happens to someone else, hopefully this helps...
----------------------------------------------------------
Preface (if you don't care, skip to Procedure):
After avoiding it for months (installed Win7x64 last summer, then started playing some BF2 again a couple months ago), I finally spent some time digging into BF2's OpenAL surround sound not working in Vista/Win7. There have been lots...and -lots-...of forum postings all over the place describing file replacements for this, with the OpenAL router/wrapper/native files, none of which worked. Then there are the EAX questions and ALchemy/SoundBack DirectSound translators adding to the confusion. Anyway, I researched this for a couple evenings, and finally managed to fix it. Pretty easy, once you know how.
After searching for the files involved, I actually found a forum posting about it, although it didn't have details for x64 Windows. Do not confuse this with emulated surround sound (Dolby Headphone and ProLogicI/II/IIx). I did try PLIIx with my ALC889A (enabled via the Windows Sound device properties' Dolby tab), and it worked...uh...better than I expected, but nothing like true discrete surround sound.
That said, I've only tested this fix on my main system, and stereo on my laptop. And for digital output, you'd need Dolby Digital Live or DTS Connect to encode the surround channels to PCM, if that works at all for Vista/Win7 under OpenAL. Lastly, I'm not sure if BF2142 has this issue, but if so, it would be basically the same fix; its the same architecture. But, eg, if BF2142 makes the enums selectable, this wouldn't matter. I've not played it. I seem to recall that Star Wars Battlefront II used the BF2 engine, so it could possibly be architected similarly; I couldn't find details on it.
Procedure [standard reminder/disclaimer to backup any changes you make]:
1. Run BF2 and set Audio renderer to 'Hardware'; this must be done first. I use: Hardware, High quality, EAX enabled (though EAX and/or acceleration may not be supported anyway). If this isn't done, BF2 may report that 'the audio settings are incompatible'; and then you can't change them without first reverting back to the original files. (see '1b' below*) This likely varies with the actual audio hardware.
2. Install OpenAL (formerly openal.org), which is currently at:
http://connect.creativelabs.com/openal/Downloads/oalinst.zip
3. Copy the 32-bit version of OpenAL32.dll from:
x86 32-bit: c:\windows\system32\
x64 64-bit: c:\windows\syswow64\ [x64's 'system32' directory is for 64-bit libraries]
...into the Battlefield 2 install directory
Rename the existing/original BF2OpenAL.dll to BF2OpenAL.dll.bf2 or something, then rename the copied OpenAL32.dll to BF2OpenAL.dll
4. Download the latest OpenAL Soft from:
http://kcat.strangesoft.net/openal.html
5. Copy soft_oal.dll (from the .zip's win32 directory) into the BF2 install directory (do not rename); copying it to the system32 (or syswow64) directory alone will not work
*1b. A more robust method to #1 above, especially if you didn't do that step, is to change the default "game.setHardware" to 1 in:
[BF2 install]\Profiles\Local\Default\sound.con
Depending on access permissions, sound.con might need copied out (or 'Saved As') to the desktop, modified as denoted, then moved back into the BF2 folder. With this method, at least for my systems, even if BF2 complained about 'incompatible settings', this defaults the audio renderer to 'AUDIOSETTINGS' to allow you to then select 'Hardware' (don't select 'Software'!).
I tested multiplayer to see if PunkBuster and/or BF2 Servers would complain about the OpenAL file changes (and the sound.con change), and it worked fine. As a control, I then tested my shaders pack (made from the Forgotten Hope mod to fix the Radeon HD3/4xxx series' "black blotches" issue, among other improvements [7-if you're curious]), and it did indeed complain about that. Therefore, it appears BF2/PB doesn't care about OpenAL changes, luckily.
Detail:
First, as this still shows up in forums...EAX has nothing to do with using surround sound. Its is simply for applying per-voice sound effects, irrespective of the number of channels. Some sound cards were able to do EAX with hardware acceleration prior to Vista (and Realtek was found to not implement the occlusion/obstruction aspects of it correctly, but later 'fixed' it [1]). Last I knew, only EAX 1.0 and 2.0 were made open standards, so other manufacturers could support them. However, the wiki page indicates that OpenAL can do up through EAX 4.0 [2]. It appears that the Creative redist of OpenAL supports EAX (see "OpenAL extensions" below). I'm not sure if they're accelerated (perhaps through ALchemy and maybe SoundBack); but it doesn't matter anymore, given the speed of modern hardware. OpenAL Soft appears to not support EAX extensions (see its "OpenAL extensions" below), but only OpenAL's own DSP; EFX.
Why BF2 surround doesn't work by default in Vista/Win7, and why OpenAL Soft fixes it:
This is because the 'Generic Hardware' enumeration was removed for Vista/Win7 OpenAL (with the loss of DirectSound [3]), and thus defaults to the 'Generic Software' enum, which only provides stereo output for BF2. Note that BF2 has an X-Fi enum through OpenAL for those cards, which is why (AFAIK) X-Fi's don't have an issue with surround/EAX (either through the BF2 wrapper BF2OpenAL.dll or Creative native driver wrapper ct_oal.dll...not sure; I don't have an X-Fi). Anyway, the game's original wrapper doesn't have an enum for the Windows speaker type setting. This is evident here (running openal-soft-1.14-bin\openal-info.exe, with files tested in Win7x64's SysWOW64 directory):
-BF2 v1.50 BF2OpenAL.dll renamed to OpenAL32.dll (Changelog from v1.41 says "Updated BF2OpenAL.dll from version 1.1.1.0 to version 2.1.8.1"):
Code:
Available playback devices:
Generic Software on Speakers (Realtek High Definition Audio)
Generic Software on Realtek Digital Output (Realtek High Definition Audio)
Available capture devices:
Microphone (Realtek High Defini
Realtek Digital Input (Realtek
Default playback device: Generic Software on Speakers (Realtek High Definition Audio)
Default capture device: Microphone (Realtek High Defini
ALC version: 1.1
** Info for device "Generic Software on Speakers (Realtek High Definition Audio)" **
ALC version: 1.1
ALC extensions:
ALC_ENUMERATE_ALL_EXT, ALC_ENUMERATION_EXT, ALC_EXT_CAPTURE, ALC_EXT_EFX
OpenAL vendor string: Creative Labs Inc.
OpenAL renderer string: Software
OpenAL version string: 1.1
OpenAL extensions:
EAX, EAX2.0, EAX3.0, EAX4.0, EAX5.0, EAX3.0EMULATED, EAX4.0EMULATED,
AL_EXT_OFFSET, AL_EXT_LINEAR_DISTANCE, AL_EXT_EXPONENT_DISTANCE
EFX version: 1.0
Max auxiliary sends: 1
Supported filters:
!!! none !!!
Supported effects:
!!! none !!!
Note that:
1. Only 'Generic Software' is available (no 'Generic Hardware' nor Windows Sound enums)
2. Various EAX versions are supported (or at least listed) in the OpenAL extensions
Now, looking at Creative's OpenAL redist (versions OpenAL32.dll 6.14.357.24 and wrap_oal.dll 2.2.0.5), the only difference is: ALC version: 1964477653.2686916
Btw, the OpenAL default wrapper, wrap_oal.dll, does work, renamed in BF2, but still doesn't give surround sound for the same reason as above (that is, no change to the available/default playback devices), though it might improve other things [4]. Again, 'Generic Hardware' isn't available in Vista/Win7.
To see how the router/wrapper/native files work, see [5]. Basically, the router OpenAL32.dll looks for other *oal.dll files, to provide the wrapper/native enums. For example, the non-free BlueRippleSound OpenAL driver is rapture3d_oal.dll [6] (would be interesting to try out their User edition...), and Realtek's DS3D translator uses rtk_oal.dll (I did try the latter, to no avail, as part of my testing). This is why OpenAL32.dll replaces BF2OpenAL.dll as part of the fix; so it can look for other wrapper files, specifically:
If we add the OpenAL Soft wrapper to the system directory, we get:
-OpenAL32.dll and wrap_oal.dll and soft_oal.dll:
Code:
Available playback devices:
Speakers (Realtek High Definition Audio)
Generic Software on Speakers (Realtek High Definition Audio)
Generic Software on Realtek Digital Output (Realtek High Definition Audio)
Available capture devices:
Microphone (Realtek High Definition Audio)
Realtek Digital Input (Realtek High Definition Audio)
Microphone (Realtek High Defini
Realtek Digital Input (Realtek
Default playback device: Speakers (Realtek High Definition Audio)
Default capture device: Microphone (Realtek High Definition Audio)
ALC version: 1964477653.2686916
** Info for device "Generic Software on Speakers (Realtek High Definition Audio)" **
ALC version: 1.1
ALC extensions:
ALC_ENUMERATE_ALL_EXT, ALC_ENUMERATION_EXT, ALC_EXT_CAPTURE, ALC_EXT_EFX
OpenAL vendor string: Creative Labs Inc.
OpenAL renderer string: Software
OpenAL version string: 1.1
OpenAL extensions:
EAX, EAX2.0, EAX3.0, EAX4.0, EAX5.0, EAX3.0EMULATED, EAX4.0EMULATED,
AL_EXT_OFFSET, AL_EXT_LINEAR_DISTANCE, AL_EXT_EXPONENT_DISTANCE
EFX version: 1.0
Max auxiliary sends: 1
Supported filters:
!!! none !!!
Supported effects:
!!! none !!!
Hooray! The Windows Sound enum, 'Speakers...', shows up as available and default; and this setup works in the BF2 folder. Unfortunately, the 'Generic Software' device is what gets queried, and (I presume) this is why this combination still doesn't provide surround in BF2.
Now, if we instead use -only- the OpenAL Soft wrapper (and rename the default one, wrap_oal.dll), we get...
-OpenAL32.dll and soft_oal.dll:
Code:
Available playback devices:
Speakers (Realtek High Definition Audio)
Available capture devices:
Microphone (Realtek High Definition Audio)
Realtek Digital Input (Realtek High Definition Audio)
Default playback device: Speakers (Realtek High Definition Audio)
Default capture device: Microphone (Realtek High Definition Audio)
ALC version: 1964477653.2686916
** Info for device "Speakers (Realtek High Definition Audio)" **
ALC version: 1.1
ALC extensions:
ALC_ENUMERATE_ALL_EXT, ALC_ENUMERATION_EXT, ALC_EXT_CAPTURE,
ALC_EXT_DEDICATED, ALC_EXT_disconnect, ALC_EXT_EFX,
ALC_EXT_thread_local_context, ALC_SOFT_loopback
OpenAL vendor string: OpenAL Community
OpenAL renderer string: OpenAL Soft
OpenAL version string: 1.1 ALSOFT 1.14
OpenAL extensions:
AL_EXT_ALAW, AL_EXT_DOUBLE, AL_EXT_EXPONENT_DISTANCE, AL_EXT_FLOAT32,
AL_EXT_IMA4, AL_EXT_LINEAR_DISTANCE, AL_EXT_MCFORMATS, AL_EXT_MULAW,
AL_EXT_MULAW_MCFORMATS, AL_EXT_OFFSET, AL_EXT_source_distance_model,
AL_LOKI_quadriphonic, AL_SOFT_buffer_samples, AL_SOFT_buffer_sub_data,
AL_SOFTX_deferred_updates, AL_SOFT_direct_channels, AL_SOFT_loop_points
EFX version: 1.0
Max auxiliary sends: 4
Supported filters:
Low-pass
Supported effects:
EAX Reverb, Reverb, Echo, Ring Modulator, Dedicated Dialog, Dedicated LFE
Voila, the Windows Sound device is available, default, AND queried. And...surround sound finally works (when setup in the BF2 folder, per the Procedure)! Just having soft_oal.dll in the system directory doesn't work, for some reason; it must be in the BF2 folder. Unfortunately, you'll note that no EAX extensions show up in the 'OpenAL extensions'. I did some testing with this fix, with and without EAX, and it didn't seem to make a difference. I also tried the original files (in stereo) with EAX, and it did seem that sounds occluded more with distance. I wouldn't say it was necessarily more realistic (I'd expect to hear a tank from quite a distance), but different. Regardless, I would -much- rather have surround sound than EAX anyway. It is, after all, why I just wrote all this.
[1]
http://techreport.com/articles.x/11171, with a followup at:
http://techreport.com/discussions.x/12970
[2]
http://en.wikipedia.org/wiki/Environmental_Audio_Extensions
[3]
http://connect.creativelabs.com/openal/OpenAL Wiki/OpenAL® and Windows Vista™.aspx
[4] Changes and bugfixes for wrap_oal.dll:
http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx
[5]
http://connect.creativelabs.com/openal/OpenAL Wiki/Enumeration with OpenAL on Windows.aspx
[6]
http://www.blueripplesound.com/compatible-games
[7]
http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=16430&view=findpost&p=177619