Best way to unmute and turn up system audio?
-
Hi, I am working on a desktop application which provides popup alerts. Due to confidentiality I cannot go into further details except for the following.
The environment this is going to be deployed in has the potential for a user to not be in front of their screen, so I have added an alert sound to the program. However, it has been requested to find a way to un-mute and turn up the system volume before playing the sound, because it is likely most users will either have their computer sound muted or the volume set low.
What would be the best way to do this?
On a Mac I can run a command in Terminal that changes the system volume, however this requires an account with permission to access Terminal and run commands in it.
Here is some information about the application:
- Targeted platforms: Windows 7, Windows XP, Mac OS X 10.7 -- 10.9
- Qt version: 5
Thank you everyone for your help.
-
Hi, welcome to devnet.
I'm not gonna help you but I just want to say that it's a bad bad idea. No application should override user settings without his explicit will or permission.
If sounds were muted that's because user didn't want sound (for whatever reason). It's not because he wanted your app to surprise him.
Think a conference or any other place where user just doesn't want to disturb other people. Or someone listens to quiet music and suddenly your app makes the computer scream at him. This is just pure evil and also reason why it's not straightforward to do. It's cause you're not suppose to. You're welcome to control volume of your app (within reason) but not the system volume levels or mute state. That is for user to do.
I would very much advise you to reconsider the idea of this functionality.
-
Okay let me provide a little more details. Again I have to be vague because of trade secrecy but I will clue you in on this:
What this program does is monitors for an emergency alert signal sent from a server and is used to alert specific staff members of an organization that an emergency is in effect, and provide them details on how to respond, without alerting everyone in the building and causing panic.
Of course these functions will have checkboxes in the application for whether to use them or not.
-
It doesn't change anything. Why provide additional level of control (the checkboxes) if the system already provides that and users are familiar with it.
quote author="adavis3473" date="1403107072"without alerting everyone in the building and causing panic.[/quote]
One more reason not to mess with sound settings.It "can be done":http://blogs.msdn.com/b/larryosterman/archive/2007/03/06/how-do-i-change-the-master-volume-in-windows-vista.aspx but I still think it's a bad idea.