Java 类javax.sound.sampled.Control.Type 实例源码

项目:OpenJSharp    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:OpenJSharp    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:jdk8u-jdk    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:jdk8u-jdk    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:openjdk-jdk10    文件:SoftMixingDataLine.java   
@Override
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:openjdk-jdk10    文件:SoftMixingDataLine.java   
@Override
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:java-stream-player    文件:StreamPlayer.java   
/**
 * Sets Pan value. Line should be opened before calling this method. Linear scale : -1.0 ... +1.0
 *
 * @param fPan
 *            the new pan
 */
public void setPan(double fPan) {

    if (!hasControl(FloatControl.Type.PAN, panControl) || fPan < -1.0 || fPan > 1.0)
        return;
    logger.info(() -> "Pan : " + fPan);
    panControl.setValue((float) fPan);
    generateEvent(Status.PAN, getEncodedStreamPosition(), null);

}
项目:java-stream-player    文件:StreamPlayer.java   
/**
 * Represents a control for the relative balance of a stereo signal between two stereo speakers. The valid range of values is -1.0 (left channel
 * only) to 1.0 (right channel only). The default is 0.0 (centered).
 *
 * @param fBalance
 *            the new balance
 */
public void setBalance(float fBalance) {
    if (hasControl(FloatControl.Type.BALANCE, balanceControl) && fBalance >= -1.0 && fBalance <= 1.0)
        balanceControl.setValue(fBalance);
    else
        try {
            throw new StreamPlayerException(StreamPlayerException.PlayerException.BALANCE_CONTROL_NOT_SUPPORTED);
        } catch (StreamPlayerException ex) {
            logger.log(Level.WARNING, ex.getMessage(), ex);
        }
}
项目:openjdk9    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:openjdk9    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:fmj-sourceforge-mirror    文件:JavaSoundRenderer.java   
private void logControls(Control[] controls)
{
    for (int i = 0; i < controls.length; i++)
    {
        Control control = controls[i];
        logger.fine("control: " + control);
        Type controlType = control.getType();
        if (controlType instanceof CompoundControl.Type)
        {
            logControls(((CompoundControl) control).getMemberControls());
        }
    }
}
项目:jdk8u_jdk    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:jdk8u_jdk    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:lookaside_java-1.8.0-openjdk    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:lookaside_java-1.8.0-openjdk    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:TuxGuitar-1.3.1-fork    文件:TGAbstractLine.java   
public Control getControl(Type type) {
    if( this.controls != null ) {
        for(Control control : this.controls) {
            if( control.getType().toString().equals(type.toString()) ) {
                return control;
            }
        }
    }
    return null;
}
项目:infobip-open-jdk-8    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:infobip-open-jdk-8    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:jdk8u-dev-jdk    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:jdk8u-dev-jdk    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:jdk7-jdk    文件:SoftMixingDataLine.java   
public Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:jdk7-jdk    文件:SoftMixingDataLine.java   
public boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:openjdk-source-code-learn    文件:SoftMixingDataLine.java   
public Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:openjdk-source-code-learn    文件:SoftMixingDataLine.java   
public boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:OLD-OpenJDK8    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:OLD-OpenJDK8    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:openjdk-jdk7u-jdk    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:openjdk-jdk7u-jdk    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:JayLayer    文件:MP3Player.java   
public Control getControl(Type type){
    initializeSource();
    if (source == null) // Not yet initialized
        return null;

    return source.getControl(type);
}
项目:openjdk-icedtea7    文件:SoftMixingDataLine.java   
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:openjdk-icedtea7    文件:SoftMixingDataLine.java   
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:gervill    文件:SoftMixingDataLine.java   
public Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
项目:gervill    文件:SoftMixingDataLine.java   
public boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
项目:fmj    文件:JavaSoundRenderer.java   
private void logControls(Control[] controls)
{
    for (int i = 0; i < controls.length; i++)
    {
        Control control = controls[i];
        logger.fine("control: " + control);
        Type controlType = control.getType();
        if (controlType instanceof CompoundControl.Type)
        {
            logControls(((CompoundControl) control).getMemberControls());
        }
    }
}
项目:OpenJSharp    文件:SoftMixingDataLine.java   
private Gain() {

            super(FloatControl.Type.MASTER_GAIN, -80f, 6.0206f, 80f / 128.0f,
                    -1, 0.0f, "dB", "Minimum", "", "Maximum");
        }
项目:OpenJSharp    文件:SoftMixingDataLine.java   
private Mute() {
    super(BooleanControl.Type.MUTE, false, "True", "False");
}
项目:OpenJSharp    文件:SoftMixingDataLine.java   
private ApplyReverb() {
    super(BooleanControl.Type.APPLY_REVERB, false, "True", "False");
}
项目:OpenJSharp    文件:SoftMixingDataLine.java   
private Balance() {
    super(FloatControl.Type.BALANCE, -1.0f, 1.0f, (1.0f / 128.0f), -1,
            0.0f, "", "Left", "Center", "Right");
}
项目:OpenJSharp    文件:SoftMixingDataLine.java   
private Pan() {
    super(FloatControl.Type.PAN, -1.0f, 1.0f, (1.0f / 128.0f), -1,
            0.0f, "", "Left", "Center", "Right");
}
项目:OpenJSharp    文件:SoftMixingDataLine.java   
private ReverbSend() {
    super(FloatControl.Type.REVERB_SEND, -80f, 6.0206f, 80f / 128.0f,
            -1, -80f, "dB", "Minimum", "", "Maximum");
}