MCPcopy Create free account
hub / github.com/MoeMod/CSMoE / SND_GetGain

Function SND_GetGain

engine/client/s_main.cpp:637–698  ·  view source on GitHub ↗

================= SND_GetGain The complete gain calculation, with SNDLVL given in dB is: GAIN = 1/dist * snd_refdist * 10 ^ (( SNDLVL - snd_refdb - (dist * snd_foliage_db_loss / 1200)) / 20 ) for gain > SND_GAIN_THRESH, start curve smoothing with GAIN = 1 - 1 / (Y * GAIN ^ SND_GAIN_POWER) where Y = -1 / ( (SND_GAIN_THRESH ^ SND_GAIN_POWER) * ( SND_GAIN_THRESH - 1 )) gain curve construction ======

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

SND_SpatializeFunction · 0.85

Calls 3

dB_To_GainFunction · 0.85
SND_GetGainObscuredFunction · 0.85
RemapValFunction · 0.50

Tested by

no test coverage detected