getSystemVolume() or the equivalent

I don't expect to be able to SET the user-controlled system volume, but being able to read it would be helpful.

Example: I'm adding alarm clock function to my Playtime clocks app. When someone sets an alarm, I'd like to be able to display a warning if the volume is set below 25%, say. (I can already detect attached headphones for the same reason.)

Could be useful for games too: if audio is absolutely vital, a game might choose to warn people if the sound is muted/low.

(My fallback solution: play a sound as the alarm is set—at least it's a chance for the user to notice on their own if they can't hear the expected feedback.)

11 Likes

Just bumping this real quick to say: I would also like this feature.

2 Likes

Thanks for the reminder. I can see how this would be useful. I'll add it to the list so we can discuss internally!

6 Likes

I'm upvoting that, it'd fun to use that as kind of a hidden control in game

1 Like

I have another use case for this function :slight_smile: I’m writing a (admittedly, very shoddy, partial) emulator, and I want to do my sound in a blocking manner for the purposes of realism, but when the system volume is set to 0 the game just feels stuttery (and the menu screen spends 30s doing nothing!) without purpose - so I’d love to be able to disable the sound emulation entirely if the system volume is 0.

I have a workaround for the title screen already (a toggle for the sounds in the PD menu :slight_smile: ), so not looking for advice. Just trying to show that there are other uses for it (or getSystemVolumeMuted() → true|false)