当前位置: 首页>>代码示例>>Java>>正文


Java Type类代码示例

本文整理汇总了Java中javax.sound.sampled.Control.Type的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Type类属于javax.sound.sampled.Control包,在下文中一共展示了Type类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getControl

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SoftMixingDataLine.java

示例2: isControlSupported

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:SoftMixingDataLine.java

示例3: getControl

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
@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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:SoftMixingDataLine.java

示例4: isControlSupported

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
@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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:SoftMixingDataLine.java

示例5: setPan

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
/**
 * 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);
	
}
 
开发者ID:goxr3plus,项目名称:java-stream-player,代码行数:16,代码来源:StreamPlayer.java

示例6: setBalance

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
/**
 * 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);
		}
}
 
开发者ID:goxr3plus,项目名称:java-stream-player,代码行数:18,代码来源:StreamPlayer.java

示例7: logControls

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
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());
        }
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:14,代码来源:JavaSoundRenderer.java

示例8: getControl

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
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;
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:11,代码来源:TGAbstractLine.java

示例9: getControl

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
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);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:12,代码来源:SoftMixingDataLine.java

示例10: isControlSupported

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
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;
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:11,代码来源:SoftMixingDataLine.java

示例11: getControl

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
public Control getControl(Type type){
    initializeSource();
    if (source == null) // Not yet initialized
        return null;

    return source.getControl(type);
}
 
开发者ID:jgkamat,项目名称:JayLayer,代码行数:8,代码来源:MP3Player.java

示例12: Gain

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
private Gain() {

            super(FloatControl.Type.MASTER_GAIN, -80f, 6.0206f, 80f / 128.0f,
                    -1, 0.0f, "dB", "Minimum", "", "Maximum");
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:SoftMixingDataLine.java

示例13: Mute

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
private Mute() {
    super(BooleanControl.Type.MUTE, false, "True", "False");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:SoftMixingDataLine.java

示例14: ApplyReverb

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
private ApplyReverb() {
    super(BooleanControl.Type.APPLY_REVERB, false, "True", "False");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:SoftMixingDataLine.java

示例15: Balance

import javax.sound.sampled.Control.Type; //导入依赖的package包/类
private Balance() {
    super(FloatControl.Type.BALANCE, -1.0f, 1.0f, (1.0f / 128.0f), -1,
            0.0f, "", "Left", "Center", "Right");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:SoftMixingDataLine.java


注:本文中的javax.sound.sampled.Control.Type类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。