Hello,
I want to control the volume of the line input of my audio card.
Here is my code:
////////////////////////////////////////
...
portMixer.open();
Port LineIn = (Port) portMixer.getLine(Port.Info.LINE_IN);
LineIn.open();
Control[] controls = LineIn.getControls();
for (i=0; i<controls.length; i++)
{
System.out.println(controls[i].toString());
}
BooleanControl Mute = (BooleanControl) LineIn.getControl(BooleanControl.Type.MUTE);
////////////////////////////////////////
The output from the println command is:
"Hauptlautstärke Control containing Mute, and Volume Controls."
Therefore I assumed that "MUTE" or "VOLUME" should be possible for a .getControl(...) call.
But .getControl(BooleanControl.Type.MUTE) throws an exception: "Unsupported control type: Mute"
Does anybody know, why this happens?
Regards,
Uwe
P.S.:
FloatControl Vol = (FloatControl) LineIn.getControl(FloatControl.Type.VOLUME); throws the exception: "Unsupported control type: Volume"