0

I am making a project related to smart computers in which I have to change volume of my PC when I raise my left or right hand in front of the webcam. I have figured out the procedure for sensing when and which hand is raised but I have no idea how to change the volume. I am not saying about volume of a media player but of the system, the master volume of the system.

Please tell how can I change the master volume of my PC.

I am doing it in Java and my PC has Windows 10.

  • Don't know much about these english terms, what is the Master volume ? – azro Jul 05 '18 at 12:43
  • Maybe this is helpful: https://stackoverflow.com/questions/4964947/set-computer-volume – vikiiii Jul 05 '18 at 12:44
  • There is a volume button on the taskbar in Windows from where we can change the volume of the PC. Master volume is used to clarify that I am not talking about any media player's volume. – Nishant Chaudhary Jul 05 '18 at 12:45
  • @vikiiii I saw that thread but the solution there is for Mac and Windows 7. That solution is not working on my Windows 10. – Nishant Chaudhary Jul 05 '18 at 12:48
  • @NishantChaudhary - Call process as mentioned in any of the answers mentioned in https://superuser.com/questions/42039/change-windows-sound-volume-via-the-command-line; you can increase or decrease volume by executing their command line equivalents through `Process` in java. – Am_I_Helpful Jul 05 '18 at 12:52
  • You will need to study the Windows 10 APIs to do such task and when you know which one do this you will have to implement a JNI interface to it in order to use. – Jorge Campos Jul 05 '18 at 12:52
  • 1
    @Am_I_Helpful Although I had to download a file and then run the command line from Java program, but I found it helpful. Thanks – Nishant Chaudhary Jul 05 '18 at 14:28
  • @NishantChaudhary - You're welcome Nishant, :). – Am_I_Helpful Jul 05 '18 at 15:01

0 Answers0