Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENGINES: Initialize mixer volume levels to levels from config #4862

Merged
merged 1 commit into from
Apr 9, 2023

Conversation

elasota
Copy link
Contributor

@elasota elasota commented Apr 2, 2023

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 call syncSoundSettings 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 in runGame because engines may expect things to be set up a certain way before syncSoundSettings 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 own syncSoundSettings override, and if the engine calls its own syncSoundSettings 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.

…ne isn't required to call syncSoundSettings at startup.
@sev-
Copy link
Member

sev- commented Apr 9, 2023

Yes, it makes sense. And the Drascula engine is most probably an oversight.

@sev- sev- merged commit 5b48ceb into scummvm:master Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants