Hi all,

I am fairly new at java. I need to control volume (volume up/down, mute) in a java application. I couldn't find a way to do this. I am developing on a linux system (for information).

I tired this code:
Java Code:
Port lineIn;
FloatControl volCtrl;
try {
  mixer = AudioSystem.getMixer(null);
  lineIn = (Port)mixer.getLine(Port.Info.LINE_IN);
  lineIn.open();
  volCtrl = (FloatControl) lineIn.getControl(

      FloatControl.Type.VOLUME);
  // Assuming getControl call succeeds, 
  // we now have our LINE_IN VOLUME control.
} catch (Exception e) {
  System.out.println("Failed trying to find LINE_IN"
    + " VOLUME control: exception = " + e);
}
but i got execption
Failed trying to find LINE_IN VOLUME control: exception = java.lang.IllegalArgumentException: Line unsupported: COMPACT_DISC source port
Thanks for your help