You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
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.
Discussed in #1180
Originally posted by nicymike June 10, 2022
Hey!
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
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.
The text was updated successfully, but these errors were encountered: