diff options
author | Chris Robinson <[email protected]> | 2022-02-08 22:41:44 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-08 22:41:44 -0800 |
commit | 3c9a705210add5aaebd95702035b8ab1fd18fc22 (patch) | |
tree | 77435f32ae02d53d3bcd9146164a96368d1a1b38 /core/context.h | |
parent | 256ea81dbe07f02d008908c90b99896f8eaaf2a5 (diff) |
Handle AirAbsorptionGainHF as a native context property
Diffstat (limited to 'core/context.h')
-rw-r--r-- | core/context.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/context.h b/core/context.h index 5f1f2ae1..f5768629 100644 --- a/core/context.h +++ b/core/context.h @@ -28,6 +28,8 @@ using uint = unsigned int; constexpr float SpeedOfSoundMetersPerSec{343.3f}; +constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */ + enum class DistanceModel : unsigned char { Disable, Inverse, InverseClamped, @@ -56,6 +58,7 @@ struct ContextProps { std::array<float,3> OrientUp; float Gain; float MetersPerUnit; + float AirAbsorptionGainHF; float DopplerFactor; float DopplerVelocity; @@ -78,9 +81,10 @@ struct ContextParams { float Gain{1.0f}; float MetersPerUnit{1.0f}; + float AirAbsorptionGainHF{AirAbsorbGainHF}; float DopplerFactor{1.0f}; - float SpeedOfSound{343.3f}; /* in units per sec! */ + float SpeedOfSound{SpeedOfSoundMetersPerSec}; /* in units per sec! */ bool SourceDistanceModel{false}; DistanceModel mDistanceModel{}; |