public void unMute() { if (audioLine == null) { isMuted = false; } else { isMuted = false; if (!audioLine.isControlSupported(BooleanControl.Type.MUTE)) return; BooleanControl control = (BooleanControl) audioLine.getControl(BooleanControl.Type.MUTE); control.setValue(false); } }
public void mute() { if (audioLine == null) { isMuted = true; } else { // when requesting the same line you sometimes get different features isMuted = true; if (!audioLine.isControlSupported(BooleanControl.Type.MUTE)) return; BooleanControl control = (BooleanControl) audioLine.getControl(BooleanControl.Type.MUTE); control.setValue(true); } }
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); } } }
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); } } }
/** Current mute state for this audio output channel */ public boolean isMuted() { if (mMuteControl != null) { return mMuteControl.getValue(); } return false; }
/** Mute audio (playback continues) */ public void mute() { if (!muted) { try { muteCtrl.setValue(true); muted = true; } catch (Exception e) { PApplet.println(e.getMessage()); } } else { try { muteCtrl.setValue(false); muted = false; } catch (Exception e) { PApplet.println(e.getMessage()); } } }
private JComponent createControlComponent(BooleanControl control) { AbstractButton button; String strControlName = control.getType().toString(); ButtonModel model = new JavaMixer.BooleanControlButtonModel(control); button = new JCheckBox(strControlName); button.setModel(model); return button; }
/** Sets the mute state for this audio output channel */ public void setMuted(boolean muted) { if (mMuteControl != null) { mMuteControl.setValue(muted); broadcast( new AudioEvent( muted ? AudioEvent.Type.AUDIO_MUTED : AudioEvent.Type.AUDIO_UNMUTED, getChannelName())); } }
/** Methode zum Muten der Sounds */ public static void mutean() { BooleanControl muteControl = (BooleanControl) clip.getControl(BooleanControl.Type.MUTE); muteControl.setValue(true); }
public boolean isSelected() { return control.getValue(); }
public void setSelected(boolean bSelected) { control.setValue(bSelected); }