PDA

View Full Version : 3D Sound / Environmental Effect / Distance Volume (Mob/Skills) (OpenAL) Release



Nightshades
02-03-2022, 12:05 PM
3D Sound / Environmental Effects / Distance Volume (Mob/Skills)
• It use OpenAL, Diablo 2 Used EAX 2.0, so it translate calls (By Hooking) to be used by OpenAL.


OpenAL provides capabilities for playing audio in a virtual 3D environment. Distance attenuation, doppler shift, and directional sound emitters are among the features handled by the API. More advanced effects, including air absorption, occlusion, and environmental reverb, are available through the EFX extension. It also facilitates streaming audio, multi-channel buffers, and audio capture.

It was freshly built by me at the time of this post, with Visual Studio 2019 using these open source projects:

https://github.com/kcat/openal-soft
https://github.com/kcat/dsoal


Installation
• Download it from my drive:https://drive.google.com/file/d/1MX00hapuJgj8mluR_JVrkFmviSJZI7ku/view?usp=sharing

Extract in:C:\Program Files (x86)\Diablo II Annihilus\Apps\<ModFolder>
This contain 2 dll which are DirectSound (dsound.dll) and OpenAL (dsoal-aldrv.dll)

• In Diablo 2 Options (in-game) Tick "3D Sound" "Environmental Effects" and put "3D Bias" to the MAX or like you prefer, i found it was also good to put "MASTER VOLUME" to the max, while reducing the "Music Volume" just enough to hear the music, you benefit from all the nice reverb and distance from skills/mobs, it's pretty immersive with headphones.

• Master Volume and 3D Bias doesn't seem to save when you exit the game.


Uninstall
• Simply delete "dsound.dll" and "dsoal-aldrv.dll" in C:\Program Files (x86)\Diablo II Annihilus\Apps\<ModFolder>


Important Note About Multi-Client
The sound will still be played even though the game is not on focus, a good trick is to use Annihilus Launcher and start the first client, then, go on Annihilus Launcher and in the options, simply tick the "NoSound", then start multiple clients, don't forget to untick the "NoSound" after you spawned the last client.

Ps: Noticeable area of reverb are: Inner cloister (and in the cathedral), Act 4 River of flames, Act 5 Hall of pain, Act 5 - Worldstone keep levels, and maybe some other places, it would be nice to see some new Annihilus level with reverb effect.


Screenshot
https://i.imgur.com/4R1slKX.png