I'm using the JAVA sound API and I'm trying to get some controls (at least the volume) on the mixers and lines but, it seems there are no control. Here is a part of the code I'm using :
for (Mixer.Info mixerInfo : AudioSystem.getMixerInfo()) {
//System.out.println("MixerInfo : "+mixerInfo.getName());
if (mixerInfo.getName().compareTo("PulseAudio Mixer")==0) {
System.out.println("Java Sound Audio Engine : "+AudioSystem.getMixer(mixerInfo));
mixer=AudioSystem.getMixer(mixerInfo);
System.out.println("\t Controls supported by Mixer:");
for(Control c : mixer.getControls()) {
System.out.println("\t =>" + c);
}
System.out.println("\t TargetLine availabe for this mixer : ");
for (Line.Info i : mixer.getTargetLineInfo()) {
System.out.println("\t => "+i);
System.out.println("\t\t Controls supported by Target Line :");
try {
for (Control c : AudioSystem.getLine(i).getControls()) {
System.out.println("\t\t =>"+c);
}
} catch (LineUnavailableException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("--------------------------");
//break;
} else {
//System.out.println("Other Mixer : "+AudioSystem.getMixer(mixerInfo));
System.out.println("Other Sound Audio Engine : "+AudioSystem.getMixer(mixerInfo));
mixer2=AudioSystem.getMixer(mixerInfo);
System.out.println("\t Controls supported by Mixer:");
for(Control c : mixer2.getControls()) {
System.out.println("\t =>" + c);
}
System.out.println("\t TargetLine availabe for this mixer :");
for (Line.Info i : mixer2.getSourceLineInfo()) {
System.out.println("\t => "+i);
System.out.println("\t\t Controls supported by Target Line :");
try {
for (Control c : AudioSystem.getLine(i).getControls()) {
System.out.println("\t\t =>"+c);
}
} catch (LineUnavailableException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("--------------------------");
}
}
And here is the result produced in the console :
Java Sound Audio Engine : org.classpath.icedtea.pulseaudio.PulseAudioMixer@1404d1 Controls supported by Mixer:
TargetLine availabe for this mixer :
=> interface TargetDataLine supporting 42 audio formats, and buffers of 0 to 1000000 bytes
Controls supported by Target Line :
Other Sound Audio Engine : com.sun.media.sound.DirectAudioDevice@13b8dae
Controls supported by Mixer:
TargetLine availabe for this mixer :
=> interface SourceDataLine supporting 512 audio formats, and buffers of at least 32 bytes
Controls supported by Target Line :
=> interface Clip supporting 512 audio formats, and buffers of at least 32 bytes
Controls supported by Target Line :
Other Sound Audio Engine : com.sun.media.sound.DirectAudioDevice@1cad7c3 Controls supported by Mixer:
TargetLine availabe for this mixer :
=> interface SourceDataLine supporting 24 audio formats, and buffers of at least 32 bytes
Controls supported by Target Line :
=> interface Clip supporting 24 audio formats, and buffers of at least 32 bytes
Controls supported by Target Line :
Other Sound Audio Engine : com.sun.media.sound.DirectAudioDevice@1a9cf86
Controls supported by Mixer:
TargetLine availabe for this mixer :
=> interface SourceDataLine supporting 24 audio formats, and buffers of at least 32 bytes
Controls supported by Target Line :
=> interface Clip supporting 24 audio formats, and buffers of at least 32 bytes
Controls supported by Target Line :
Other Sound Audio Engine : com.sun.media.sound.PortMixer@17fd320 Controls supported by Mixer:
TargetLine availabe for this mixer :
=> Mic Boost source port
Controls supported by Target Line :
=> Capture source port
Controls supported by Target Line :
=> Digital source port
What can be the problem ?
Note : I'm not on a Windows OS but on a Xubuntu (linux) OS. That's why I don't have a Java Sound Audio Engine but a PulseAudioMixer.