Sound::ProcessCutoffList
function · sound · primitive
- Address
0x7a5000· 461 bytes, up to0x7a51cc- Meaning
- Cuts off, resumes or scales each listed sound by its distance from the listener
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- sound/engine#distance-cutoff
- Test
sound::channel_dist_update
Finding: Distance cutoff in sound: the engine
Sound::SetCutoffDistanceSquared(c) stores the distance c (not its square) for a 3D sound: 0
removes the sound from the cutoff list; otherwise it joins it, and a looped sound at or beyond c
of the listener, or at a NaN distance, is paused under reason 3 and flagged cut off. Each frame, a
listed sound strictly beyond c is skipped if cut off, suspended if looped, left playing if
flagged 0x4, and released otherwise. In range its distance gain is 1 − min(max(d − 0.9c, 0), k) / k with
k = c · 0.10000002: recomputed every frame between 0.9c and c, and once on entering 0.9c,
which leaving re-arms. A cut-off sound coming back resumes, restarting its stream.
The derivation is in the doc.
Callers 1
- Sound::Update sound
Callees 9
- CDataAllocator::PutData base
- Sound::Destructor sound
- Sound::IsCutOff sound
- Sound::Suspend sound
- Sound::Resume sound
- Sound::UpdateVolume sound
- Sound::SetPauseReason sound
- Sound::SetNearCutoff sound
- Sound::IsNearCutoff sound
Calls and jumps by a bare address, from tables/calls.tsv.