MCPcopy Create free account
hub / github.com/LabSound/LabSound / linearGain

Method linearGain

src/internal/src/Distance.cpp:43–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43double DistanceEffect::linearGain(double distance)
44{
45 // We want a gain that decreases linearly from m_refDistance to
46 // m_maxDistance. The gain is 1 at m_refDistance.
47 return (1.0 - m_rolloffFactor * (distance - m_refDistance) / (m_maxDistance - m_refDistance));
48}
49
50double DistanceEffect::inverseGain(double distance)
51{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected