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

Adding more options for volume #1187

Closed
AlmasB opened this issue Jul 20, 2022 Discussed in #1180 · 1 comment
Closed

Adding more options for volume #1187

AlmasB opened this issue Jul 20, 2022 Discussed in #1180 · 1 comment
Assignees
Milestone

Comments

@AlmasB
Copy link
Owner

AlmasB commented Jul 20, 2022

Discussed in #1180

Originally posted by nicymike June 10, 2022
Hey!

  1. What do you think about adding a new setting to audio for master volume.
    Many games have three (or sometimes more) volume sliders: master, music, sound.
    The volume for playing audio is then calculated by:
    soundVolumeForPlay = master * sound
    musicVolumeForPlay = master * music

  2. What do you think about adding the possibility to play a sound with a different volume eg. adding a new optional parameter to the methods for playing a sound or music.
    In my game I have certain sounds for ambience which should be played with lower volume.
    What I am currently doing with FXGL is: 1. Lower sound volume, 2. Play sound, 3. Raise sound volume.

@AlmasB
Copy link
Owner Author

AlmasB commented Jul 20, 2022

Relevant extract:

That's a good point. It seems the implementation is hidden from public API. This might have been necessary to hide cross-platform support (particularly on mobile), but I don't see why we couldn't open access to getAudio(). From the list you will note the method is actually there, just hidden in $fxgl_core. I'm happy to turn this into an issue, so we can track it and fix it eventually.

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

No branches or pull requests

1 participant