ENGINES: Initialize mixer volume levels to levels from config #4862
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.
Ran into this while testing Reah. Basically,
syncSoundSettings
is normally called by the UI any time you leave the menu, however it is not called when launching the game (including when loading a save), which means the engine has to callsyncSoundSettings
itself.I think it would make sense that if the exiting the UI sets the sound mixer to the expected state by default, then it should be set correctly by default when the game launches too.
I think it is probably not safe to just call
syncSoundSettings
inrunGame
because engines may expect things to be set up a certain way beforesyncSoundSettings
is called, however I believe it should be safe to just initialize the mixer.From what I can tell, every existing engine except for Drascula calls
Engine::syncSoundSettings
in its ownsyncSoundSettings
override, and if the engine calls its ownsyncSoundSettings
override during startup (which Drascula does) then it won't matter anyway because it'll override this new behavior.So, basically this removes the need to call
syncSoundSettings
from the engine on startup, which should make engine init slightly simpler.