Nuclide
Software Development Kit for id Tech
Sound: EFX

EAX

Creative Technology's Environmental Audio Extensions, also known as EAX, attempted to create more ambiance within video games by more accurately simulating a real-world audio environment.

The release of Windows Vista deprecated the DirectSound3D API on which EAX relied on in 2007, so Creative Technology encouraged the move to OpenAL's EFX.

EFX

EFX is a system in OpenAL that delivers high quality sound reverberation. It is the successor to Creative's Environmental Audio Extensions.

Nuclide offers abstraction for new and old entities relying on digital signal processing.

Entities interacting with EFX

env_sound is most commonly used to change the environmental sound processing of a room/area.

In GoldSrc, it'll specify which enumeration of DSP preset to use for audio playback, in Nuclide however we just map it to a definitions file in the filesystem. See EFX files below.

EFX defintion files

Entities that specify a EFX type, usually want to load one from a file.

Here's an example one, efx/city.efx:

density "1.000000"
diffusion "0.500000"
gain "0.316200"
gain_hf "0.398100"
gain_lf "1.000000"
decay_time "1.490000"
decay_hf_ratio "0.670000"
decay_lf_ratio "1.000000"
reflections_gain "0.073000"
reflections_delay "0.007000"
reflections_pan "0 0 0"
late_reverb_gain "0.142700"
late_reverb_delay "0.011000"
late_reverb_pan "0 0 0"
echo_time "0.250000"
echo_depth "0.000000"
modulation_time "0.250000"
modulation_depth "0.000000"
air_absorbtion_hf "0.994300"
hf_reference "5000.000000"
lf_reference "250.000000"
room_rolloff_factor "0.000000"
decay_limit "1"

Most of the parameters are self explanatory.

Console Variables

With the cvar s_al_debug set to 1 you'll get an overlay of information about which EFX file is currently being used, as well as what every single parameter is set to.

You can refresh EFX definitions with a map restart.

Legacy translation table

This section describes behaviour specific to converting entities from Half-Life based levels into the Nuclide environment.

Here you can see which efx file is responsible for handling a legacy env_sound room-type.

roomtype ID EFX file
0 efx/default.efx
1 efx/gs_generic.efx
2 efx/gs_metal_s.efx
3 efx/gs_metal_m.efx
4 efx/gs_metal_l.efx
5 efx/gs_tunnel_s.efx
6 efx/gs_tunnel_m.efx
7 efx/gs_tunnel_l.efx
8 efx/gs_chamber_s.efx
9 efx/gs_chamber_m.efx
10 efx/gs_chamber_l.efx
11 efx/gs_bright_s.efx
12 efx/gs_bright_m.efx
13 efx/gs_bright_l.efx
14 efx/gs_water1.efx
15 efx/gs_water2.efx
16 efx/gs_water3.efx
17 efx/gs_concrete_s.efx
18 efx/gs_concrete_m.efx
19 efx/gs_concrete_l.efx
20 efx/gs_big1.efx
21 efx/gs_big2.efx
22 efx/gs_big3.efx
23 efx/gs_cavern_s.efx
24 efx/gs_cavern_m.efx
25 efx/gs_cavern_l.efx
26 efx/gs_weirdo1.efx
27 efx/gs_weirdo2.efx
28 efx/gs_weirdo3.efx