use of javax.sound.sampled.BooleanControl in project Minim by ddf.
the class Controller method setValue.
private void setValue(BooleanControl.Type type, boolean v) {
if (hasControl(type)) {
BooleanControl c = (BooleanControl) getControl(type);
c.setValue(v);
} else {
Minim.error(type.toString() + " is not supported.");
}
}
use of javax.sound.sampled.BooleanControl in project Minim by ddf.
the class Controller method getValue.
private boolean getValue(BooleanControl.Type type) {
boolean v = false;
if (hasControl(type)) {
BooleanControl c = (BooleanControl) getControl(type);
v = c.getValue();
} else {
Minim.error(type.toString() + " is not supported.");
}
return v;
}
use of javax.sound.sampled.BooleanControl in project Spark by igniterealtime.
the class JavaMixer method setMicrophoneInput.
public void setMicrophoneInput() {
TreePath path = findByName(new TreePath(root), new String[] { "MICROPHONE", "Select" });
if (path == null) {
path = findByName(new TreePath(root), new String[] { "Capture source", "Capture", "Mute" });
}
if (path != null) {
if (path.getLastPathComponent() instanceof JavaMixer.ControlNode) {
BooleanControl bControl = (BooleanControl) (((JavaMixer.ControlNode) path.getLastPathComponent()).getControl());
bControl.setValue(true);
}
}
}
use of javax.sound.sampled.BooleanControl in project Spark by igniterealtime.
the class JavaMixer method setMuteForMicrophoneOutput.
public void setMuteForMicrophoneOutput() {
TreePath path = findByName(new TreePath(root), new String[] { "SPEAKER", "Microfone", "Mute" });
if (path == null) {
path = findByName(new TreePath(root), new String[] { "MIC target", "mic", "Mute" });
}
if (path != null) {
if (path.getLastPathComponent() instanceof JavaMixer.ControlNode) {
BooleanControl bControl = (BooleanControl) (((JavaMixer.ControlNode) path.getLastPathComponent()).getControl());
bControl.setValue(true);
}
}
}
Aggregations