Jump to content
The Dark Mod Forums

Improve your TDM experience by playing with OpenAL Soft HRTF (better 3d audio)


Hiradur
 Share

Recommended Posts

Got this working with TDM, left to right sounds great, but I still have a hard time telling up from down.

 

In this case the default HRTF dataset is probably not matching your head shape well. With luck you will find one which suits your head shape better if you follow this guide: https://www.reddit.com/r/oculus/comments/1fzonq/psa_for_games_using_openal_including_minecraft/cagd3lb

 

How does the KHz setting affect the success of this system? I've read that I should set it manually in the config file to 44.1 at least for Thief 2. Normally my sound card is set to 96.000 btw. So do I need to change both the config file and the sound card settings to 44.1000 to make it work properly?

 

It comes down to for which sample rate you have HRTF datasets available. The problem with the Thief games is that they run at 22,050 Hz and the smallest sample rate you can generate HRTF datasets for is 32,000 Hz with makehrtf.exe. So you have to enforce a higher frequency in the OpenAL Soft config. The sample rate set in Windows doesn't have an effect because the chain goes like this: game sample rate -> OpenAL Soft sample rate (resample if necessary) -> Windows sample rate (resample if necessary).

The default HRTF datasets coming with OpenAL Soft are for 44,100Hz and 48,000Hz but you could generate some for 96,000Hz with makehrtf.exe if you desire.

 

For Thief games I recommend to enforce a multiple of 22,050Hz (44.1kHz, 88.2kHz etc.) to reduce resampling artifacts. For modern games I suggest to enforce nothing or enforce a multiple of 48kHz because that's what most modern games run at.

Edited by Hiradur
Link to comment
Share on other sites

Thanks for clarification and sorry for all the dumb questions btw :blush:

I really want to get this working :)

 

There are no dumb questions, especially for game audio. There is a lot of wrong information on the internet (e.g. people claiming that EAX equals 5.1 surround sound) so just ask if something is unclear.

  • Like 1
Link to comment
Share on other sites

So I set it up for my Thief 2 NewDark installation (installed with Taffer Patcher) and it also creates a log file now. Ingame in audio I have chosen "OpenAL" and I've set the frequency to 441000 Hz and activated hrtf both in the config file. I get an EAX like echo which changes from room to room (depending on the size) and also there seems to be at least stereo. But looking in my openal.log hrtf seems not to work properly. Asus GX mode is set to OFF and I've set its mode to 2 speakers.

 

Here is my log file for Thief 2

 

 

AL lib: (II) alc_initconfig: Supported backends: mmdevapi, dsound, winmm, null, wave
AL lib: (II) ReadALConfig: Loading config C:\Users\Toni\AppData\Roaming\alsoft.ini...
AL lib: (II) GetConfigValue: Key disable-cpu-exts not found
AL lib: (II) FillCPUCaps: Detected max CPUID function: 0xd (ext. 0x80000008)
AL lib: (II) FillCPUCaps: Vendor ID: ""
AL lib: (II) FillCPUCaps: Name: "       Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz"
AL lib: (II) FillCPUCaps: Extensions: +SSE +SSE2 +SSE3 +SSE4.1
AL lib: (II) GetConfigValue: Key rt-prio not found
AL lib: (II) GetConfigValue: Key resampler not found
AL lib: (II) GetConfigValue: Key trap-al-error not found
AL lib: (II) GetConfigValue: Key trap-alc-error not found
AL lib: (II) GetConfigValue: Key reverb/boost not found
AL lib: (II) GetConfigValue: Key reverb/emulate-eax not found
AL lib: (II) GetConfigValue: Key drivers not found
AL lib: (II) ALCmmdevProxy_messageHandler: Starting message thread
AL lib: (II) ALCmmdevProxy_messageHandler: Message thread initialization complete
AL lib: (II) ALCmmdevProxy_messageHandler: Starting message loop
AL lib: (II) alc_initconfig: Initialized backend "mmdevapi"
AL lib: (II) alc_initconfig: Added "mmdevapi" for playback
AL lib: (II) alc_initconfig: Initialized backend "dsound"
AL lib: (II) alc_initconfig: Added "dsound" for capture
AL lib: (II) GetConfigValue: Key excludefx not found
AL lib: (II) GetConfigValue: Key default-reverb not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1029 (lparam=00000000, wparam=00C6EFD8)
AL lib: (II) add_device: Got device "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)", "{0.0.0.00000000}.{42dc78fb-61e4-46e1-9c62-d268e7a54c30}"
AL lib: (II) add_device: Got device "OpenAL Soft on Realtek Digital Output(Optical) (Realtek High Definition Audio)", "{0.0.0.00000000}.{290aa64d-1678-472f-a8d1-66cbfe82b7e2}"
AL lib: (II) add_device: Got device "OpenAL Soft on S/PDIF Pass-through Device (ASUS Xonar DX Audio Device)", "{0.0.0.00000000}.{9c709da6-46a2-4f01-b895-d40a35ed10bb}"
AL lib: (II) add_device: Got device "OpenAL Soft on Realtek Digital Output (Realtek High Definition Audio)", "{0.0.0.00000000}.{c8a97082-5c37-45ae-bd7c-c2b2638701a3}"
AL lib: (II) GetConfigValue: Key channels not found
AL lib: (II) GetConfigValue: Key sample-type not found
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key periods not found
AL lib: (II) GetConfigValue: Key period_size not found
AL lib: (II) GetConfigValue: Key sources not found
AL lib: (II) GetConfigValue: Key slots not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1024 (lparam=06D1D790, wparam=00C6EF40)
AL lib: (II) alcOpenDevice: Created device 06D0EB10, "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)"
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) GetConfigValue: Key hrtf not found
AL lib: (II) UpdateDeviceParams: Pre-reset: Stereo, Float, *22050hz, 512 update size x4
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1025 (lparam=06D1D790, wparam=00C6EEAC)
AL lib: (EE) UpdateDeviceParams: Failed to set 22050hz, got 44100hz instead
AL lib: (II) UpdateDeviceParams: Post-reset: Stereo, Float, 44100hz, 441 update size x9
AL lib: (WW) UpdateDeviceParams: SSE performs best with multiple of 4 update sizes (441)
AL lib: (II) GetConfigValue: Key stereo-mode not found
AL lib: (II) GetConfigValue: Key hrtf-mode not found
AL lib: (II) UpdateDeviceParams: HRTF disabled
AL lib: (II) GetConfigValue: Key cf_level not found
AL lib: (II) UpdateDeviceParams: BS2B disabled
AL lib: (II) GetConfigValue: Key layouts/stereo/type not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1026 (lparam=06D1D790, wparam=00C6EEAC)
AL lib: (II) alcCreateContext: Created context 06D1D800
AL lib: (II) AllocLines: New reverb buffer length: 127360 samples (2.887982 sec)
AL lib: (II) FreeContext: 06D1D800
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1027 (lparam=06D1D790, wparam=00C6F630)
AL lib: (II) FreeDevice: 06D0EB10
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1028 (lparam=06D1D790, wparam=00C6F604)
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1029 (lparam=00000000, wparam=00C6EEE0)
AL lib: (II) add_device: Got device "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)", "{0.0.0.00000000}.{42dc78fb-61e4-46e1-9c62-d268e7a54c30}"
AL lib: (II) add_device: Got device "OpenAL Soft on Realtek Digital Output(Optical) (Realtek High Definition Audio)", "{0.0.0.00000000}.{290aa64d-1678-472f-a8d1-66cbfe82b7e2}"
AL lib: (II) add_device: Got device "OpenAL Soft on S/PDIF Pass-through Device (ASUS Xonar DX Audio Device)", "{0.0.0.00000000}.{9c709da6-46a2-4f01-b895-d40a35ed10bb}"
AL lib: (II) add_device: Got device "OpenAL Soft on Realtek Digital Output (Realtek High Definition Audio)", "{0.0.0.00000000}.{c8a97082-5c37-45ae-bd7c-c2b2638701a3}"
AL lib: (II) GetConfigValue: Key channels not found
AL lib: (II) GetConfigValue: Key sample-type not found
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key periods not found
AL lib: (II) GetConfigValue: Key period_size not found
AL lib: (II) GetConfigValue: Key sources not found
AL lib: (II) GetConfigValue: Key slots not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1024 (lparam=00FFAEC0, wparam=00C6EE48)
AL lib: (II) alcOpenDevice: Created device 06D9F5C0, "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)"
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) GetConfigValue: Key hrtf not found
AL lib: (II) UpdateDeviceParams: Pre-reset: Stereo, Float, *22050hz, 512 update size x4
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1025 (lparam=00FFAEC0, wparam=00C6EDB4)
AL lib: (EE) UpdateDeviceParams: Failed to set 22050hz, got 44100hz instead
AL lib: (II) UpdateDeviceParams: Post-reset: Stereo, Float, 44100hz, 441 update size x9
AL lib: (WW) UpdateDeviceParams: SSE performs best with multiple of 4 update sizes (441)
AL lib: (II) GetConfigValue: Key stereo-mode not found
AL lib: (II) GetConfigValue: Key hrtf-mode not found
AL lib: (II) UpdateDeviceParams: HRTF disabled
AL lib: (II) GetConfigValue: Key cf_level not found
AL lib: (II) UpdateDeviceParams: BS2B disabled
AL lib: (II) GetConfigValue: Key layouts/stereo/type not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1026 (lparam=00FFAEC0, wparam=00C6EDB4)
AL lib: (II) alcCreateContext: Created context 06D0E850
AL lib: (II) AllocLines: New reverb buffer length: 127360 samples (2.887982 sec)
AL lib: (II) FreeContext: 06D0E850
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1027 (lparam=00FFAEC0, wparam=00C6F554)
AL lib: (II) FreeDevice: 06D9F5C0
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1028 (lparam=00FFAEC0, wparam=00C6F528)
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1029 (lparam=00000000, wparam=00C6F0B8)
AL lib: (II) add_device: Got device "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)", "{0.0.0.00000000}.{42dc78fb-61e4-46e1-9c62-d268e7a54c30}"
AL lib: (II) add_device: Got device "OpenAL Soft on Realtek Digital Output(Optical) (Realtek High Definition Audio)", "{0.0.0.00000000}.{290aa64d-1678-472f-a8d1-66cbfe82b7e2}"
AL lib: (II) add_device: Got device "OpenAL Soft on S/PDIF Pass-through Device (ASUS Xonar DX Audio Device)", "{0.0.0.00000000}.{9c709da6-46a2-4f01-b895-d40a35ed10bb}"
AL lib: (II) add_device: Got device "OpenAL Soft on Realtek Digital Output (Realtek High Definition Audio)", "{0.0.0.00000000}.{c8a97082-5c37-45ae-bd7c-c2b2638701a3}"
AL lib: (II) GetConfigValue: Key channels not found
AL lib: (II) GetConfigValue: Key sample-type not found
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key periods not found
AL lib: (II) GetConfigValue: Key period_size not found
AL lib: (II) GetConfigValue: Key sources not found
AL lib: (II) GetConfigValue: Key slots not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1024 (lparam=00FFF290, wparam=00C6F020)
AL lib: (II) alcOpenDevice: Created device 06DD6A40, "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)"
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) GetConfigValue: Key hrtf not found
AL lib: (II) UpdateDeviceParams: Pre-reset: Stereo, Float, *22050hz, 512 update size x4
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1025 (lparam=00FFF290, wparam=00C6EF8C)
AL lib: (EE) UpdateDeviceParams: Failed to set 22050hz, got 44100hz instead
AL lib: (II) UpdateDeviceParams: Post-reset: Stereo, Float, 44100hz, 441 update size x9
AL lib: (WW) UpdateDeviceParams: SSE performs best with multiple of 4 update sizes (441)
AL lib: (II) GetConfigValue: Key stereo-mode not found
AL lib: (II) GetConfigValue: Key hrtf-mode not found
AL lib: (II) UpdateDeviceParams: HRTF disabled
AL lib: (II) GetConfigValue: Key cf_level not found
AL lib: (II) UpdateDeviceParams: BS2B disabled
AL lib: (II) GetConfigValue: Key layouts/stereo/type not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1026 (lparam=00FFF290, wparam=00C6EF8C)
AL lib: (II) alcCreateContext: Created context 06DB85F0
AL lib: (II) AllocLines: New reverb buffer length: 127360 samples (2.887982 sec)
AL lib: (II) FreeContext: 06DB85F0
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1027 (lparam=00FFF290, wparam=00C6E170)
AL lib: (II) FreeDevice: 06DD6A40
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1028 (lparam=00FFF290, wparam=00C6E144)

 

 

 

Dark Mod said something similiar:

 

 

 

AL lib: (II) alc_initconfig: Supported backends: mmdevapi, dsound, winmm, null, wave
AL lib: (II) ReadALConfig: Loading config C:\Users\Toni\AppData\Roaming\alsoft.ini...
AL lib: (II) GetConfigValue: Key disable-cpu-exts not found
AL lib: (II) FillCPUCaps: Detected max CPUID function: 0xd (ext. 0x80000008)
AL lib: (II) FillCPUCaps: Vendor ID: ""
AL lib: (II) FillCPUCaps: Name: "       Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz"
AL lib: (II) FillCPUCaps: Extensions: +SSE +SSE2 +SSE3 +SSE4.1
AL lib: (II) GetConfigValue: Key rt-prio not found
AL lib: (II) GetConfigValue: Key resampler not found
AL lib: (II) GetConfigValue: Key trap-al-error not found
AL lib: (II) GetConfigValue: Key trap-alc-error not found
AL lib: (II) GetConfigValue: Key reverb/boost not found
AL lib: (II) GetConfigValue: Key reverb/emulate-eax not found
AL lib: (II) GetConfigValue: Key drivers not found
AL lib: (II) ALCmmdevProxy_messageHandler: Starting message thread
AL lib: (II) ALCmmdevProxy_messageHandler: Message thread initialization complete
AL lib: (II) ALCmmdevProxy_messageHandler: Starting message loop
AL lib: (II) alc_initconfig: Initialized backend "mmdevapi"
AL lib: (II) alc_initconfig: Added "mmdevapi" for playback
AL lib: (II) alc_initconfig: Initialized backend "dsound"
AL lib: (II) alc_initconfig: Added "dsound" for capture
AL lib: (II) GetConfigValue: Key excludefx not found
AL lib: (II) GetConfigValue: Key default-reverb not found
AL lib: (II) GetConfigValue: Key channels not found
AL lib: (II) GetConfigValue: Key sample-type not found
AL lib: (II) GetConfigValue: Key frequency not found
AL lib: (II) GetConfigValue: Key periods not found
AL lib: (II) GetConfigValue: Key period_size not found
AL lib: (II) GetConfigValue: Key sources not found
AL lib: (II) GetConfigValue: Key slots not found
AL lib: (II) GetConfigValue: Key sends not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1024 (lparam=004EAF40, wparam=04B9EBB8)
AL lib: (II) alcOpenDevice: Created device 00B2E2E0, "OpenAL Soft on Lautsprecher (ASUS Xonar DX Audio Device)"
AL lib: (II) GetConfigValue: Key hrtf not found
AL lib: (II) UpdateDeviceParams: Pre-reset: Stereo, Float, 44100hz, 1024 update size x4
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1025 (lparam=004EAF40, wparam=04B9EB20)
AL lib: (II) UpdateDeviceParams: Post-reset: Stereo, Float, 44100hz, 882 update size x4
AL lib: (WW) UpdateDeviceParams: SSE performs best with multiple of 4 update sizes (882)
AL lib: (II) GetConfigValue: Key stereo-mode not found
AL lib: (II) GetConfigValue: Key hrtf-mode not found
AL lib: (II) UpdateDeviceParams: HRTF disabled
AL lib: (II) GetConfigValue: Key cf_level not found
AL lib: (II) UpdateDeviceParams: BS2B disabled
AL lib: (II) GetConfigValue: Key layouts/stereo/type not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1026 (lparam=004EAF40, wparam=04B9EB20)
AL lib: (II) alcCreateContext: Created context 004EF030
AL lib: (II) FreeContext: 004EF030
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1027 (lparam=004EAF40, wparam=04B9F3E4)
AL lib: (II) FreeDevice: 00B2E2E0
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1028 (lparam=004EAF40, wparam=04B9F3B0)

 

 

 

EDIT: Is it because I have OpenAL installed too? I didn't know how to uninstall it / uninstaller wasnt working, so I just let it there and installed OpenAL Soft just again like you stated in post #001.

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

So I set it up for my Thief 2 NewDark installation (installed with Taffer Patcher) and it also creates a log file now. Ingame in audio I have chosen "OpenAL" and I've set the frequency to 441000 Hz and activated hrtf both in the config file. I get an EAX like echo which changes from room to room (depending on the size) and also there seems to be at least stereo. But looking in my openal.log hrtf seems not to work properly. Asus GX mode is set to OFF and I've set its mode to 2 speakers.

 

EDIT: Is it because I have OpenAL installed too? I didn't know how to uninstall it / uninstaller wasnt working, so I just let it there and installed OpenAL Soft just again like you stated in post #001.

 

Looks like you didn't change "#hrtf = auto" to "hrtf = true". hrtf = auto only turns on HRTF if OpenAL Soft detects headphones which I believe it only does when Windows detects headphones, which, from my experience, it rarely does.

 

It's safe to have Creative's OpenAL installed as well. It works like this: The game will first look for OpenAL32.dll in the same folder where the .exe file is. If it doesn't find it there it'll instead look at C:\Windows\system32 (32bit Windows or 64bit game on 64bit Windows) or C:\Windows\SysWOW64 (32bit games on 64bit Windows). So if you have e.g. Creative's OpenAL32.dll in C:\Windows\system32 and OpenAL Soft's OpenAL32.dll in the game folder only OpenAL Soft will be used.

Link to comment
Share on other sites

You mean this?

## hrtf:
#  Controls HRTF processing. These filters provide better spatialization of
#  sounds while using headphones, but do require a bit more CPU power. The
#  default filters will only work with 44100hz or 48000hz stereo output. While
#  HRTF is used, the cf_level option is ignored. Setting this to auto (default)
#  will allow HRTF to be used when headphones are detected or the app requests
#  it, while setting true or false will forcefully enable or disable HRTF
#  respectively.
hrtf = true

I have set it up in the config file in my User folder, yes

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

You mean this?

## hrtf:
#  Controls HRTF processing. These filters provide better spatialization of
#  sounds while using headphones, but do require a bit more CPU power. The
#  default filters will only work with 44100hz or 48000hz stereo output. While
#  HRTF is used, the cf_level option is ignored. Setting this to auto (default)
#  will allow HRTF to be used when headphones are detected or the app requests
#  it, while setting true or false will forcefully enable or disable HRTF
#  respectively.
hrtf = true

I have set it up in the config file in my User folder, yes

 

Yes, this. Is it in the right folder (%appdata%)? Because the log file indicates the value is not set:

AL lib: (II) GetConfigValue: Key hrtf not found
Link to comment
Share on other sites

If I insert %APPDATA% into my explorer, I get directed to my user folder in AppData/roaming which exactly is here C:\Users\Toni\AppData\Roaming\openal\hrtf

There I have three files. the default-44100.mhr, the default-48000.mhr and the alsoft.ini in which I made the hrtf = true. This is correct, right?

 

This is what is in the file:

 

 

 

# OpenAL config file.
#
# Option blocks may appear multiple times, and duplicated options will take the
# last value specified. Environment variables may be specified within option
# values, and are automatically substituted when the config file is loaded.
# Environment variable names may only contain alpha-numeric characters (a-z,
# A-Z, 0-9) and underscores (_), and are prefixed with $. For example,
# specifying "$HOME/file.ext" would typically result in something like
# "/home/user/file.ext". To specify an actual "$" character, use "$$".
#
# Device-specific values may be specified by including the device name in the
# block name, with "general" replaced by the device name. That is, general
# options for the device "Name of Device" would be in the [Name of Device]
# block, while ALSA options would be in the [alsa/Name of Device] block.
# Options marked as "(global)" are not influenced by the device.
#
# The system-wide settings can be put in /etc/openal/alsoft.conf and user-
# specific override settings in $HOME/.alsoftrc.
# For Windows, these settings should go into $AppData\alsoft.ini
#
# Option and block names are case-senstive. The supplied values are only hints
# and may not be honored (though generally it'll try to get as close as
# possible). Note: options that are left unset may default to app- or system-
# specified values. These are the current available settings:

##
## General stuff
##
[general]

## disable-cpu-exts: (global)
#  Disables use of specialized methods that use specific CPU intrinsics.
#  Certain methods may utilize CPU extensions for improved performance, and
#  this option is useful for preventing some or all of those methods from being
#  used. The available extensions are: sse, sse2, sse3, sse4.1, and neon.
#  Specifying 'all' disables use of all such specialized methods.
#disable-cpu-exts =

## drivers: (global)
#  Sets the backend driver list order, comma-seperated. Unknown backends and
#  duplicated names are ignored. Unlisted backends won't be considered for use
#  unless the list is ended with a comma (e.g. 'oss,' will try OSS first before
#  other backends, while 'oss' will try OSS only). Backends prepended with -
#  won't be considered for use (e.g. '-oss,' will try all available backends
#  except OSS). An empty list means to try all backends.
#drivers =

## channels:
#  Sets the output channel configuration. If left unspecified, one will try to
#  be detected from the system, and defaulting to stereo. The available values
#  are: mono, stereo, quad, surround51, surround51rear, surround61, surround71
#channels =

## sample-type:
#  Sets the output sample type. Currently, all mixing is done with 32-bit float
#  and converted to the output sample type as needed. Available values are:
#  int8    - signed 8-bit int
#  uint8   - unsigned 8-bit int
#  int16   - signed 16-bit int
#  uint16  - unsigned 16-bit int
#  int32   - signed 32-bit int
#  uint32  - unsigned 32-bit int
#  float32 - 32-bit float
#sample-type = float32

## frequency:
#  Sets the output frequency. If left unspecified it will try to detect a
#  default from the system, otherwise it will default to 44100.
frequency = 44100

## period_size:
#  Sets the update period size, in frames. This is the number of frames needed
#  for each mixing update. Acceptable values range between 64 and 8192.
#period_size = 1024

## periods:
#  Sets the number of update periods. Higher values create a larger mix ahead,
#  which helps protect against skips when the CPU is under load, but increases
#  the delay between a sound getting mixed and being heard. Acceptable values
#  range between 2 and 16.
#periods = 4

## stereo-mode:
#  Specifies if stereo output is treated as being headphones or speakers. With
#  headphones, HRTF or crossfeed filters may be used for better audio quality.
#  Valid settings are auto, speakers, and headphones.
#stereo-mode = auto

## hrtf:
#  Controls HRTF processing. These filters provide better spatialization of
#  sounds while using headphones, but do require a bit more CPU power. The
#  default filters will only work with 44100hz or 48000hz stereo output. While
#  HRTF is used, the cf_level option is ignored. Setting this to auto (default)
#  will allow HRTF to be used when headphones are detected or the app requests
#  it, while setting true or false will forcefully enable or disable HRTF
#  respectively.
hrtf = true

## hrtf_tables:
#  Specifies a comma-separated list of files containing HRTF data sets. The
#  format of the files are described in hrtf.txt. The filenames may contain
#  these markers, which will be replaced as needed:
#  %r - Device sampling rate
#  %s - Non-greedy string (up to the following matching characters)
#  %% - Percent sign (%)
#  The listed files are relative to system-dependant data directories. On
#  Windows this is:
#  $AppData\openal\hrtf
#  And on other systems, it's (in order):
#  $XDG_DATA_HOME/openal/hrtf  (defaults to $HOME/.local/share/openal/hrtf)
#  $XDG_DATA_DIRS/openal/hrtf  (defaults to /usr/local/share/openal/hrtf and
#                               /usr/share/openal/hrtf)
#  An absolute path may also be specified, if the given file is elsewhere.
#hrtf_tables = %s.mhr

## cf_level:
#  Sets the crossfeed level for stereo output. Valid values are:
#  0 - No crossfeed
#  1 - Low crossfeed
#  2 - Middle crossfeed
#  3 - High crossfeed (virtual speakers are closer to itself)
#  4 - Low easy crossfeed
#  5 - Middle easy crossfeed
#  6 - High easy crossfeed
#  Users of headphones may want to try various settings. Has no effect on non-
#  stereo modes.
#cf_level = 0

## resampler: (global)
#  Selects the resampler used when mixing sources. Valid values are:
#  point - nearest sample, no interpolation
#  linear - extrapolates samples using a linear slope between samples
#  sinc4 - extrapolates samples using a 4-point Sinc filter
#  sinc8 - extrapolates samples using an 8-point Sinc filter
#  bsinc - extrapolates samples using a band-limited Sinc filter (varying
#          between 12 and 24 points, with anti-aliasing)
#  Specifying other values will result in using the default (linear).
#resampler = linear

## rt-prio: (global)
#  Sets real-time priority for the mixing thread. Not all drivers may use this
#  (eg. PortAudio) as they already control the priority of the mixing thread.
#  0 and negative values will disable it. Note that this may constitute a
#  security risk since a real-time priority thread can indefinitely block
#  normal-priority threads if it fails to wait. As such, the default is
#  disabled.
#rt-prio = 0

## sources:
#  Sets the maximum number of allocatable sources. Lower values may help for
#  systems with apps that try to play more sounds than the CPU can handle.
#sources = 256

## slots:
#  Sets the maximum number of Auxiliary Effect Slots an app can create. A slot
#  can use a non-negligible amount of CPU time if an effect is set on it even
#  if no sources are feeding it, so this may help when apps use more than the
#  system can handle.
#slots = 4

## sends:
#  Sets the number of auxiliary sends per source. When not specified (default),
#  it allows the app to request how many it wants. The maximum value currently
#  possible is 4.
#sends =

## excludefx: (global)
#  Sets which effects to exclude, preventing apps from using them. This can
#  help for apps that try to use effects which are too CPU intensive for the
#  system to handle. Available effects are: eaxreverb,reverb,chorus,compressor,
#  distortion,echo,equalizer,flanger,modulator,dedicated
#excludefx =

## default-reverb: (global)
#  A reverb preset that applies by default to all sources on send 0
#  (applications that set their own slots on send 0 will override this).
#  Available presets are: None, Generic, PaddedCell, Room, Bathroom,
#  Livingroom, Stoneroom, Auditorium, ConcertHall, Cave, Arena, Hangar,
#  CarpetedHallway, Hallway, StoneCorridor, Alley, Forest, City, Moutains,
#  Quarry, Plain, ParkingLot, SewerPipe, Underwater, Drugged, Dizzy, Psychotic.
#default-reverb =

## trap-alc-error: (global)
#  Generates a SIGTRAP signal when an ALC device error is generated, on systems
#  that support it. This helps when debugging, while trying to find the cause
#  of a device error. On Windows, a breakpoint exception is generated.
#trap-alc-error = false

## trap-al-error: (global)
#  Generates a SIGTRAP signal when an AL context error is generated, on systems
#  that support it. This helps when debugging, while trying to find the cause
#  of a context error. On Windows, a breakpoint exception is generated.
#trap-al-error = false

##
## Reverb effect stuff (includes EAX reverb)
##
[reverb]

## boost: (global)
#  A global amplification for reverb output, expressed in decibels. The value
#  is logarithmic, so +6 will be a scale of (approximately) 2x, +12 will be a
#  scale of 4x, etc. Similarly, -6 will be about half, and -12 about 1/4th. A
#  value of 0 means no change.
#boost = 0

## emulate-eax: (global)
#  Allows the standard reverb effect to be used in place of EAX reverb. EAX
#  reverb processing is a bit more CPU intensive than standard, so this option
#  allows a simpler effect to be used at the loss of some quality.
#emulate-eax = false

##
## PulseAudio backend stuff
##
[pulse]

## spawn-server: (global)
#  Attempts to autospawn a PulseAudio server whenever needed (initializing the
#  backend, enumerating devices, etc). Setting autospawn to false in Pulse's
#  client.conf will still prevent autospawning even if this is set to true.
#spawn-server = true

## allow-moves: (global)
#  Allows PulseAudio to move active streams to different devices. Note that the
#  device specifier (seen by applications) will not be updated when this
#  occurs, and neither will the AL device configuration (sample rate, format,
#  etc).
#allow-moves = false

## fix-rate:
#  Specifies whether to match the playback stream's sample rate to the device's
#  sample rate. Enabling this forces OpenAL Soft to mix sources and effects
#  directly to the actual output rate, avoiding a second resample pass by the
#  PulseAudio server.
#fix-rate = false

##
## ALSA backend stuff
##
[alsa]

## device: (global)
#  Sets the device name for the default playback device.
#device = default

## device-prefix: (global)
#  Sets the prefix used by the discovered (non-default) playback devices. This
#  will be appended with "CARD=c,DEV=d", where c is the card id and d is the
#  device index for the requested device name.
#device-prefix = plughw:

## device-prefix-*: (global)
#  Card- and device-specific prefixes may be used to override the device-prefix
#  option. The option may specify the card id (eg, device-prefix-NVidia), or
#  the card id and device index (eg, device-prefix-NVidia-0). The card id is
#  case-sensitive.
#device-prefix- =

## capture: (global)
#  Sets the device name for the default capture device.
#capture = default

## capture-prefix: (global)
#  Sets the prefix used by the discovered (non-default) capture devices. This
#  will be appended with "CARD=c,DEV=d", where c is the card id and d is the
#  device number for the requested device name.
#capture-prefix = plughw:

## capture-prefix-*: (global)
#  Card- and device-specific prefixes may be used to override the
#  capture-prefix option. The option may specify the card id (eg,
#  capture-prefix-NVidia), or the card id and device index (eg,
#  capture-prefix-NVidia-0). The card id is case-sensitive.
#capture-prefix- =

## mmap:
#  Sets whether to try using mmap mode (helps reduce latencies and CPU
#  consumption). If mmap isn't available, it will automatically fall back to
#  non-mmap mode. True, yes, on, and non-0 values will attempt to use mmap. 0
#  and anything else will force mmap off.
#mmap = true

## allow-resampler:
#  Specifies whether to allow ALSA's built-in resampler. Enabling this will
#  allow the playback device to be set to a different sample rate than the
#  actual output, causing ALSA to apply its own resampling pass after OpenAL
#  Soft resamples and mixes the sources and effects for output.
#allow-resampler = false

##
## OSS backend stuff
##
[oss]

## device: (global)
#  Sets the device name for OSS output.
#device = /dev/dsp

## capture: (global)
#  Sets the device name for OSS capture.
#capture = /dev/dsp

##
## Solaris backend stuff
##
[solaris]

## device: (global)
#  Sets the device name for Solaris output.
#device = /dev/audio

##
## QSA backend stuff
##
[qsa]

##
## JACK backend stuff
##
[jack]

## spawn-server: (global)
#  Attempts to autospawn a JACK server whenever needed (initializing the
#  backend, opening devices, etc).
#spawn-server = false

## buffer-size:
#  Sets the update buffer size, in samples, that the backend will keep buffered
#  to handle the server's real-time processing requests. This value must be a
#  power of 2, or else it will be rounded up to the next power of 2. If it is
#  less than JACK's buffer update size, it will be clamped. This option may
#  be useful in case the server's update size is too small and doesn't give the
#  mixer time to keep enough audio available for the processing requests.
#buffer-size = 0

##
## MMDevApi backend stuff
##
[mmdevapi]

##
## DirectSound backend stuff
##
[dsound]

##
## Windows Multimedia backend stuff
##
[winmm]

##
## PortAudio backend stuff
##
[port]

## device: (global)
#  Sets the device index for output. Negative values will use the default as
#  given by PortAudio itself.
#device = -1

## capture: (global)
#  Sets the device index for capture. Negative values will use the default as
#  given by PortAudio itself.
#capture = -1

##
## Wave File Writer stuff
##
[wave]

## file: (global)
#  Sets the filename of the wave file to write to. An empty name prevents the
#  backend from opening, even when explicitly requested.
#  THIS WILL OVERWRITE EXISTING FILES WITHOUT QUESTION!
#file =

## bformat: (global)
#  Creates AMB format files using first-order ambisonics instead of a standard
#  single- or multi-channel .wav file.
#bformat = false

 

 

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

If I insert %APPDATA% into my explorer, I get directed to my user folder in AppData/roaming which exactly is here C:\Users\Toni\AppData\Roaming\openal\hrtf

There I have three files. the default-44100.mhr, the default-48000.mhr and the alsoft.ini in which I made the hrtf = true. This is correct, right?

 

alsoft.ini should go into C:\Users\Toni\AppData\Roaming\ not the the openal subfolder.

Link to comment
Share on other sites

Omg you're so smart, thank you! :laugh:

 

Now it says hrtf key true and frequency 44100 found. Also ingame it seems to work properly. Especially in Thief 2 I can better find out where the sound is coming from. What an experience together with the room echoes, wow! Thank you so much, again for posting this guide! :)

 

EDIT:

The echoes are very strong in Thief 2 though (I don't hear any in TDM). I reduced them in the config file by -12dB.

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

  • 3 months later...

I'm pretty sure that's just a default electric light buzzing sound that some mappers have decided to put on their lights. I don't personally like it either, how I fix it is I try to get out of the room containing the light :rolleyes:

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

We are targeting a July 1st release.

Beta is starting very soon:

 

http://forums.thedarkmod.com/topic/18069-testers-needed-for-tdm-204-public-beta-period/

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Are the really no more samples other than 44k and 48k? I play at 192k.

There aren't, but you can create some yourself with the makehrtf tool.

 

Anyway, I'd like to point out here that sample rates higher than 44.1/48 kHz may have a negative impact on playback quality. I don't want to go into the details myself but I recommend reading this article: https://xiph.org/~xiphmont/demo/neil-young.html

This article was created by the Xiph foundation, they guys behind the free and open source audio codecs FLAC, Vorbis, Opus and a few others.

Edited by Hiradur
Link to comment
Share on other sites

  • 2 years later...

P.S. I have enabled HRTF with default dataset on SVN.

 

That's awesome!!!!!

Anyway, I'd like to point out here that sample rates higher than 44.1/48 kHz actually decrease audio quality even though marketing wants to make you believe otherwise. I don't want to go into details myself but if you are interested in why I recommend this excellent post and the videos it links to: https://xiph.org/~xiphmont/demo/neil-young.html

This post was created by the Xiph foundation, they guys behind the free and open source audio codecs FLAC, Vorbis, Opus and a few others.

Wow, that's quite the misleading generalization there. As an information theorist myself, I was quite surprised by your comment. However, skimming through that article, it became clear quickly, that nothing's wrong with the format per se, but with the cheaper range playback devices. Regardless, for internal signal processing tasks such as HRTF calculations, it might make sense to work at higher bitdepth and resolution first and downsample afterwards.

  • Like 1
Link to comment
Share on other sites

Are there any downsides?

Forcing HRTF causes incorrect filtering on speaker setups. Recent OpenAL Soft versions autodetect if headphones or speakers are used and turn on HRTF automatically. I think the autodetection only works if your audio jack is clearly labeled as a headphone jack in the OS (e.g. front outputs of onboard audio).

 

Wow, that's quite the misleading generalization there.

I was talking about audio playback but reading over the sentence again I could definitely have expressed it in a better way. I edited the above post to make it a bit more clear. Edited by Hiradur
  • Like 1
Link to comment
Share on other sites

Forcing HRTF causes incorrect filtering on speaker setups. Recent OpenAL Soft versions autodetect if headphones or speakers are used and turn on HRTF automatically. I think the autodetection only works if your audio jack is clearly labeled as a headphone jack in the OS (e.g. front outputs of onboard audio).

Could you please be more specific about "incorrect filtering" ?

I think I tried both setting no value and hrtf = auto in alsoft.ini, but it did not enable HRTF for me with headphones plugged in.

Link to comment
Share on other sites

Got this working with TDM, left to right sounds great, but I still have a hard time telling up from down.

In this case the default HRTF dataset is probably not matching your head shape well. With luck you will find one which suits your head shape better if you follow this guide: https://www.reddit.com/r/oculus/comments/1fzonq/psa_for_games_using_openal_including_minecraft/cagd3lb

I don't think it's necessarily the wrong HRTF data set because all those HRTFs are based on recordings that were located on a horizontal plane at ear height, so the model simply does not contain any information on how to filter verticality.

 

Regardless, if you feel like the 3D sound is not good enough for you, I followed the link posted by Hiradur to check out some other HRTF datasets and converted them all for you to try out. Download them here from my dropbox!

 

Howto use different HRTF datasets

  • Give these sounds a listen to find out which dataset fits best for you: http://recherche.ircam.fr/equipes/salles/listen/sounds.html
  • Copy the files contained in this archive somewhere and find the file whose filename ends with your dataset number.
  • Open alsoft.ini
    • set hrtf-paths to the path where you copied the files (I just copied them in the TDM folder together with the alsoft.ini and TDM/openALSoft will find them automatically)
    • set default-hrtf to the filename without its extension, e.g., oalsoft_hrtf_44100_IRC_1049.
    • set hrtf = true
    • set stereo-mode = headphones
  • Make sure your Sounddriver is set to output 44100 Hz. (I am note sure whether a 48000 Hz file can be generated easily from these sources)
  • Launch TDM via batch to enable openAL Soft logging just to make sure everything has been loaded properly:

    set ALSOFT_LOGLEVEL=3

    set ALSOFT_LOGFILE=[your dark mod directory]\openallog.txt

    start TheDarkModx64.exe

    exit

  • Open openallog.txt, scroll to the end and check whether the mhr has been loaded correctly. It should read like:

AL lib: (II) GetLoadedHrtf: Loading [PATH TO YOUR MHR]...

AL lib: (II) GetLoadedHrtf: Detected data set format v1

AL lib: (II) GetLoadedHrtf: Loaded HRTF support for format: Stereo 44100hz

I have created the mhr files using openal-soft-1.18.2 because TDM also runs this version and won't be able to decode mhr files from newer versions. The attached archive also contains the python script that I used to generate the mhr files.

  • Like 1
Link to comment
Share on other sites

Could you please be more specific about "incorrect filtering" ?

He means that HRTF-filtering does not work with speakers. HRTF-filtering emulates how the headshape and the shape of your ears interact with sound waves. With a perfect HRTF-Model (taylored to you), you should be able to hear perfect 3d audio using regular stereo head phones. If you use speakers, however, the HRTF-filtering will be performed twice, once in software and once due to your actual head and ear shape. This renders the filtering ineffective and may actually be perceived as a downgrade of software quality. With headphones, the head and ear shape have now effect, because the soundwaves are directly injected into your ear.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


  • Recent Status Updates

    • peter_spy

      Deathloop – what a mess of a game. I'd love to see a post-mortem on it some day. I hope Arkane is doing okay though.
      · 12 replies
    • OrbWeaver

      I like house-cleaning and taking out the trash.
      · 1 reply
    • STiFU

      Be honest: Who of you have actually finished Cuphead? This game is freaking tough! It might even be harder than Sekiro. Dark Souls is a joke in comparison to Cuphead! :-D 
      · 8 replies
    • duzenko

      Please, can we finally group the missions by year in the game menu?
      · 6 replies
    • duzenko

      I vaguely recall someone recently complained about two-sided materials (curtains?) not getting lighting from both sides
      I just found a piece of code that's supposed to do just that
      Where was that discussed? (@nbohr1more?)
      · 9 replies
×
×
  • Create New...