LAGonauta / MetaAudio

GoldSrc engine plugin for 3D sound
GNU General Public License v2.0
98 stars 14 forks source link
3d-audio goldsrc goldsrc-engine hrtf openal surround

Warning

While the plugin is not a cheat, VAC may flag MetaHook and ban the user. Do not use with Steam in online mode, we are not responsible if your account is banned.

MetaAudio

This is a fork of MetaAudio, a GoldSrc plugin that adds OpenAL support to its sound system. This fork fixes some bugs and uses Alure instead of OpenAL directly for easier source management.

Thus we now have HRTF and surround sound back to our beloved GoldSrc games, and, as this plugin hooks directly into the engine, most mods should work with the new system.

Working games and mods:

What works

What is better than current GoldSrc

Console variables

Console commands

Executable arguments

Manual Installation

Copy the "metahook" folder to your mod dir.

Copy the other files to Steam's Half-Life dir.

Example folder structure, where can be "valve", "cstrike", "ns", "gearbox" or any other mod:

|%STEAM%\steamapps\common\Half-Life\
|----> metahook.exe
|----> sndfile.dll
|----> OpenAL32.dll (remove to use X-Fi hardware acceleration)
|----> <game>\
  |----> metahook\
    |----> plugins\
      |----> MetaAudio.dll
    |----> configs\
      |----> plugins.lst

One should load the game through "MetaHook.exe". It is recommended to create a shortcut with at least the following launch options: "-steam -insecure -game ". There are two sample shorcut files included, "OpenAL Half-Life" and "OpenAL Natural-Selection".

There should be an "MetaAudio.dll" entry in "plugins.lst".

One Click Installation

  1. You have to compile the MetaAudio by yourself before installation. see Compiling

  2. Run install-to-(WhateverGameYouWant).bat

  3. Launch game from shortcut MetaHook for (WhateverGameYouWant)

Known bugs

Maybe in the future

Build Requirements

  1. Visual Studio 2017 / 2019 / 2022, with vc141 / vc142 / vc143 toolset

  2. CMake

  3. Git for Windows

Compiling

  1. Run build-initdeps.bat, wait until all required submodules / dependencies are pulled. (this may takes couple of minutes, depending on your network connection and download speed)

  2. Run build-MetaAudio.bat, wail until all binary files generated.

(legacy) ~~Just load the MetaHook solution, set your post-build event to your desired folder and compile normally with Visual Studio. Tested with MSVC 2019. Remember to install C++ CRT.~~

The include Alure2 has a slight different API than upstream, therefore must be compiled together.

Debugging

  1. Run build-initdeps.bat, wait until all required submodules / dependencies are pulled. (this may takes couple of minutes, depending on your network connection and download speed)

  2. Run debug-(WhateverGameYouWant).bat, depends on which you are going to debug with

  3. Open MetaHook.sln with Visual Studio IDE, set specified project as launch project, compile the project, then press F5 to start debugging.

Credits

nagist, for MetaHook (https://github.com/nagist/metahook)

hzqst, for the original MetaAudio (https://github.com/hzqst/MetaRenderer)

Support

Support group available through an XMPP MUC:

xmpp:metaaudio@conference.xmpp.zone?join