我在添加MUTE控件时遇到问题。
赦免我,我是初学者。private BooleanControl muteControl;
private Clip audioClip;
public void load(String audioFilePath)
throws UnsupportedAudioFileException, IOException,
LineUnavailableException {
File audioFile = new File(audioFilePath);
AudioInputStream ais = AudioSystem
.getAudioInputStream(audioFile);
AudioFormat format = ais.getFormat();
DataLine.Info info = new DataLine.Info(Clip.class, format);
audioClip = (Clip) AudioSystem.getLine(info);
muteControl = (BooleanControl) audioClip.getControl(BooleanControl.Type.MUTE);
audioClip.addLineListener(this);
audioClip.open(ais);
}
第muteControl = (BooleanControl) audioClip.getControl(BooleanControl.Type.MUTE);
行
继续给我一个" IlligalArgumentException:不支持的控件类型:静音"
我也尝试过使用MASTER_GAIN控件,它给了我"" IlligalArgumentException:不支持的控件类型:MASTER_GAIN"