I want to make a java program that
I don't know how do the volume part, of this program. I have looked online for the past hour and I can't seem to get an idea on how to do this, or if it is even possible.
I forgot to add (I'm using windows 7)
Here's how: In the search box on the taskbar, type control panel, then select it from the results. Select Hardware and Sound from the Control Panel, and then select Sound. On the Playback tab, select and hold (or right-click) the listing for your audio device, select Set as Default Device, and then select OK.
In Windows, click the sound icon in the Windows Notification Area of the Taskbar that looks like a speaker. In the small window that appears, drag the volume down to turn down the sound. You can follow the same procedure and drag the slider up to the desired volume level to turn it back up later.
I have written an utility class for controlling volume which is used like that:
Audio.setMasterOutputVolume(0.5f);
Source code is here: https://github.com/Kunagi/ilarkesto/blob/master/src/main/java/ilarkesto/media/Audio.java
You can copy and use the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With