diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-02-06 01:26:53 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-02-09 01:31:50 +0200 |
commit | 4cec3133197cd39efd607b82169a85f56c77aa68 (patch) | |
tree | d4b79a730b82c4b56896c0377e2c1ee091410ba9 /indra/newview/llvieweraudio.cpp | |
parent | 78dc1c872aa966de010ca94c4d7a651259679502 (diff) |
SL-19585 Switch OpenAL's wind to float
Fixes wind being odly distorted
Diffstat (limited to 'indra/newview/llvieweraudio.cpp')
-rw-r--r-- | indra/newview/llvieweraudio.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 6a0edbecb1..949cafb3d3 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -545,8 +545,13 @@ void audio_update_wind(bool force_update) // don't use the setter setMaxWindGain() because we don't // want to screw up the fade-in on startup by setting actual source gain // outside the fade-in. - F32 master_volume = gSavedSettings.getBOOL("MuteAudio") ? 0.f : gSavedSettings.getF32("AudioLevelMaster"); - F32 ambient_volume = gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient"); + static LLCachedControl<bool> mute_audio(gSavedSettings, "MuteAudio"); + static LLCachedControl<bool> mute_ambient(gSavedSettings, "MuteAmbient"); + static LLCachedControl<F32> level_master(gSavedSettings, "AudioLevelMaster"); + static LLCachedControl<F32> level_ambient(gSavedSettings, "AudioLevelAmbient"); + + F32 master_volume = mute_audio() ? 0.f : level_master(); + F32 ambient_volume = mute_ambient() ? 0.f : level_ambient(); F32 max_wind_volume = master_volume * ambient_volume; const F32 WIND_SOUND_TRANSITION_TIME = 2.f; |