As a Roblox developer I want my game to have a high quality soundtrack and other high quality audio. A property/signal in the API for checking if the player’s client or operating system is muted would be very useful for improving both load-times and game performance.
The main use-case for this is to delay the loading/playing of game music until the user unmutes their device. This can potentially save megabytes of mobile data usage for players, as well as take strain off the web service that delivers assets.
My custom character rendering system would also benefit from this, because the skeleton hierarchy would not need to create/destroy/update joints when short sounds are played for characters.
Some API suggestions:
This could be implemented as a bool or number member of SoundService, although a StarterGui:GetCore() method that returns a BoolValue or NumberValue might make more sense because the CoreGui controls volume.
A boolean would specify if the client is muted, or a number would specify the client’s volume as a value between 0 and 1 inclusive (which may or may not be useful).
Roblox’s vision may be more aligned towards the idea of instead automatically streaming audio at a low bitrate when muted, then update sounds to higher quality in real-time when unmuted, but an API for checking if the game is muted is much simpler.
For the player’s client, I think that property should be UserSettings().GameSettings.MasterVolume, it’s a float ratio (0-1). No signal for it, however, you could hook into the standard button keycodes that are used to up/down volume in the client (or is this actually a thing? I’m not sure) and then re-read the volume on those, and you could read the volume on GuiService.MenuClosed as well to see if they changed the slider setting.
No way to check for the system though, as you say.
I mean couldn’t Roblox theoretically do this automatically? “Oh, Player1’s volume is muted, let’s not load any sounds.”
I don’t see the point of giving us a way to see if the device is muted. If the problem is sounds are using up too much data, this would be an odd solution.
Bumping this because there is still no support for reading a user’s game volume. To provide my own use-case, I am trying to create a horror game that tracks a user’s volume settings. If the volume is lowered or muted, I, and other developers, are able prompt users to turn their volume back up to a suggested level. Please provide the ability for developers to read user volume, as this is a very basic yet useful functionality.