diff options
-rw-r--r-- | al/source.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/al/source.cpp b/al/source.cpp index f1f1fe7d..6483473d 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -3996,6 +3996,9 @@ float ALsource::eax_calculate_dst_occlusion_mb( float path_ratio, float lf_ratio) noexcept { + if(src_occlusion_mb == 0) + return 0.0f; + const auto ratio_1 = path_ratio + lf_ratio - 1.0F; const auto ratio_2 = path_ratio * lf_ratio; const auto ratio = (ratio_2 > ratio_1) ? ratio_2 : ratio_1; @@ -4020,13 +4023,14 @@ EaxAlLowPassParam ALsource::eax_create_direct_filter_param() const noexcept for (auto i = std::size_t{}; i < EAX_MAX_FXSLOTS; ++i) { - if (!eax_active_fx_slots_[i]) - { + if(!eax_active_fx_slots_[i]) continue; - } const auto& send = eax_.sends[i]; + if(send.lOcclusion == 0) + continue; + gain_mb += eax_calculate_dst_occlusion_mb( send.lOcclusion, send.flOcclusionDirectRatio, |