Rise
The Vieneo Province
Loading...
Searching...
No Matches
RainAirAudio.h
Go to the documentation of this file.
1#pragma once
2#include <algorithm>
3#include <cmath>
4
5namespace RainAirAudio
6{
7// Match the existing square-root atmospheric audio curve, normalized to the
8// authored Vieneo surface mix. staticDensity is the client's pressure/altitude
9// proxy, not temperature-corrected mass density. This is an audio approximation.
10inline float ExteriorGain(float relativePressure)
11{
12 return std::isfinite(relativePressure)
13 ? std::sqrt(std::clamp(relativePressure, 0.f, 1.f)) : 0.f;
14}
15}
float ExteriorGain(float relativePressure)