Can Java Sound be used to control the system volume?
问题 Java Sound offers FloatControl instances for various sound line functionality, and both a MASTER_GAIN & VOLUME control type. Can these controls be used to change the system volume? 回答1: No, it cannot. Here is source adapted from an answer to Adjusting master volume on coderanch. The source iterates the available lines, checks if they have a control of the right type, and if so, puts them in a GUI attached to a JSlider import java.awt.*; import javax.swing.*; import javax.sound.sampled.*;