Rise
The Vieneo Province
Toggle main menu visibility
Loading...
Searching...
No Matches
RainAirAudio.h
Go to the documentation of this file.
1
#pragma once
2
#include <algorithm>
3
#include <cmath>
4
5
namespace
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.
10
inline
float
ExteriorGain
(
float
relativePressure)
11
{
12
return
std::isfinite(relativePressure)
13
? std::sqrt(std::clamp(relativePressure, 0.f, 1.f)) : 0.f;
14
}
15
}
RainAirAudio
Definition
RainAirAudio.h:6
RainAirAudio::ExteriorGain
float ExteriorGain(float relativePressure)
Definition
RainAirAudio.h:10
RainAirAudio.h
Generated on
for Rise by
1.18.0