java类javax.sound.sampled.Port的实例源码

PortMixer.java 文件源码 项目:OpenJSharp 阅读 22 收藏 0 点赞 0 评论 0
public Line getLine(Line.Info info) throws LineUnavailableException {
    Line.Info fullInfo = getLineInfo(info);

    if ((fullInfo != null) && (fullInfo instanceof Port.Info)) {
        for (int i = 0; i < portInfos.length; i++) {
            if (fullInfo.equals(portInfos[i])) {
                return getPort(i);
            }
        }
    }
    throw new IllegalArgumentException("Line unsupported: " + info);
}
PortMixer.java 文件源码 项目:OpenJSharp 阅读 23 收藏 0 点赞 0 评论 0
public int getMaxLines(Line.Info info) {
    Line.Info fullInfo = getLineInfo(info);

    // if it's not supported at all, return 0.
    if (fullInfo == null) {
        return 0;
    }

    if (fullInfo instanceof Port.Info) {
        //return AudioSystem.NOT_SPECIFIED; // if several instances of PortMixerPort
        return 1;
    }
    return 0;
}
PortMixer.java 文件源码 项目:OpenJSharp 阅读 22 收藏 0 点赞 0 评论 0
Port getPort(int index) {
    if (ports == null) {
        ports = new PortMixerPort[portInfos.length];
    }
    if (ports[index] == null) {
        ports[index] = new PortMixerPort((Port.Info)portInfos[index], this, index);
        return ports[index];
    }
    // $$fb TODO: return (Port) (ports[index].clone());
    return ports[index];
}
PortMixer.java 文件源码 项目:OpenJSharp 阅读 20 收藏 0 点赞 0 评论 0
private PortMixerPort(Port.Info info,
                      PortMixer mixer,
                      int portIndex) {
    super(info, mixer, null);
    if (Printer.trace) Printer.trace("PortMixerPort CONSTRUCTOR: info: " + info);
    this.portIndex = portIndex;
}
PortMixer.java 文件源码 项目:jdk8u-jdk 阅读 29 收藏 0 点赞 0 评论 0
public Line getLine(Line.Info info) throws LineUnavailableException {
    Line.Info fullInfo = getLineInfo(info);

    if ((fullInfo != null) && (fullInfo instanceof Port.Info)) {
        for (int i = 0; i < portInfos.length; i++) {
            if (fullInfo.equals(portInfos[i])) {
                return getPort(i);
            }
        }
    }
    throw new IllegalArgumentException("Line unsupported: " + info);
}
PortMixer.java 文件源码 项目:jdk8u-jdk 阅读 21 收藏 0 点赞 0 评论 0
public int getMaxLines(Line.Info info) {
    Line.Info fullInfo = getLineInfo(info);

    // if it's not supported at all, return 0.
    if (fullInfo == null) {
        return 0;
    }

    if (fullInfo instanceof Port.Info) {
        //return AudioSystem.NOT_SPECIFIED; // if several instances of PortMixerPort
        return 1;
    }
    return 0;
}
PortMixer.java 文件源码 项目:jdk8u-jdk 阅读 26 收藏 0 点赞 0 评论 0
Port getPort(int index) {
    if (ports == null) {
        ports = new PortMixerPort[portInfos.length];
    }
    if (ports[index] == null) {
        ports[index] = new PortMixerPort((Port.Info)portInfos[index], this, index);
        return ports[index];
    }
    // $$fb TODO: return (Port) (ports[index].clone());
    return ports[index];
}
PortMixer.java 文件源码 项目:jdk8u-jdk 阅读 26 收藏 0 点赞 0 评论 0
private PortMixerPort(Port.Info info,
                      PortMixer mixer,
                      int portIndex) {
    super(info, mixer, null);
    if (Printer.trace) Printer.trace("PortMixerPort CONSTRUCTOR: info: " + info);
    this.portIndex = portIndex;
}
PortMixer.java 文件源码 项目:openjdk-jdk10 阅读 30 收藏 0 点赞 0 评论 0
@Override
public Line getLine(Line.Info info) throws LineUnavailableException {
    Line.Info fullInfo = getLineInfo(info);

    if ((fullInfo != null) && (fullInfo instanceof Port.Info)) {
        for (int i = 0; i < portInfos.length; i++) {
            if (fullInfo.equals(portInfos[i])) {
                return getPort(i);
            }
        }
    }
    throw new IllegalArgumentException("Line unsupported: " + info);
}
PortMixer.java 文件源码 项目:openjdk-jdk10 阅读 23 收藏 0 点赞 0 评论 0
@Override
public int getMaxLines(Line.Info info) {
    Line.Info fullInfo = getLineInfo(info);

    // if it's not supported at all, return 0.
    if (fullInfo == null) {
        return 0;
    }

    if (fullInfo instanceof Port.Info) {
        //return AudioSystem.NOT_SPECIFIED; // if several instances of PortMixerPort
        return 1;
    }
    return 0;
}


问题


面经


文章

微信
公众号

扫码关注公众号