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 /alc/context.cpp | |
parent | 256ea81dbe07f02d008908c90b99896f8eaaf2a5 (diff) |
Handle AirAbsorptionGainHF as a native context property
Diffstat (limited to 'alc/context.cpp')
-rw-r--r-- | alc/context.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index f24282f8..bd03eb67 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -181,6 +181,7 @@ void ALCcontext::init() mParams.Velocity = alu::Vector{}; mParams.Gain = mListener.Gain; mParams.MetersPerUnit = mListener.mMetersPerUnit; + mParams.AirAbsorptionGainHF = mAirAbsorptionGainHF; mParams.DopplerFactor = mDopplerFactor; mParams.SpeedOfSound = mSpeedOfSound * mDopplerVelocity; mParams.SourceDistanceModel = mSourceDistanceModel; @@ -572,11 +573,6 @@ float ALCcontext::eax_get_max_filter_gain() const noexcept return eax_max_filter_gain_; } -float ALCcontext::eax_get_air_absorption_factor() const noexcept -{ - return eax_air_absorption_factor_; -} - EaxFxSlotIndex ALCcontext::eax_get_previous_primary_fx_slot_index() const noexcept { return eax_previous_primary_fx_slot_index_; @@ -951,7 +947,8 @@ void ALCcontext::eax_set_distance_factor() void ALCcontext::eax_set_air_absorbtion_hf() { - eax_air_absorption_factor_ = eax_.context.flAirAbsorptionHF / EAXCONTEXT_DEFAULTAIRABSORPTIONHF; + mAirAbsorptionGainHF = eax_.context.flAirAbsorptionHF; + mPropsDirty.set(std::memory_order_release); } void ALCcontext::eax_set_hf_reference() @@ -1360,7 +1357,6 @@ void ALCcontext::eax_apply_deferred() if (eax_context_dirty_flags_.flAirAbsorptionHF) { - eax_context_shared_dirty_flags_.air_absorption_hf = true; eax_set_air_absorbtion_hf(); } |