Fix ambient sound not updating in game on setting options change #2030
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Bugfixes "Fix ambient volume not updating after options change"
Purpose of change
Fix #2019
Ambient effect volume is not updated after changing it through the options in game.
The volume will only be updated after you move to an other area.
Which can be annoying if you want to test if you like an ambient sound, to adjust the volume etc.
Describe the solution
I first tried to update the volume of the current ambient effect after options change in game (same behavior as music).
But several channels (ambient sounds), can be played simultaneously.
So I now:
Describe alternatives you've considered
I could keep track of every channel parameters to restart every channels on options change, but I feel like it would complexify the code for little gain.
Here the main goals are reached, changing the volume gives instant result, so a player can quickly tweak the ambiant effect volume, and won't think that it's bugged.
Testing