olá estou desenvolvendo um programa e criei um botao de play e pause mas preciso setar o volume e nao estou conseguindo, podem me ajudar esse é o codigo
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package prejarvis;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;
/**
*
* @author Rodrigo Costa
*/
public class Musica {
FileInputStream fiz;
BufferedInputStream BIS;
public long pauseLocation;
public Player player;
public void play(String path){
try {
fiz = new FileInputStream(path);
BIS = new BufferedInputStream(fiz);
player = new Player(BIS);
} catch (Exception e) {
}
new Thread(){
@Override
public void run(){
try {
player.play();
} catch (JavaLayerException ex) {
}
}
}.start();
}
public void pause(){
if (player != null) {
try {
pauseLocation = fiz.available();
player.close();
} catch (IOException ex) {
}
} else {
}
}
}