Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to control clip volume java

public static void play(Clip clip) {
    if (Settings.getSettings().isVolumeOn()) {
        FloatControl volume = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
        volume.setValue(-1 * Settings.getSettings().getVolume());
        clip.start();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #control #clip #volume #java
ADD COMMENT
Topic
Name
7+4 =