/** Checks if a Mixer is appropriate.
A Mixer is considered appropriate if it support the given line type.
If isMixingRequired is true and the line type is an output one
(SourceDataLine, Clip), the mixer is appropriate if it supports
at least 2 (concurrent) lines of the given type.
@return true if the mixer is considered appropriate according to the
rules given above, false otherwise.
*/
private static boolean isAppropriateMixer(Mixer mixer,
Line.Info lineInfo,
boolean isMixingRequired) {
if (! mixer.isLineSupported(lineInfo)) {
return false;
}
Class lineClass = lineInfo.getLineClass();
if (isMixingRequired
&& (SourceDataLine.class.isAssignableFrom(lineClass) ||
Clip.class.isAssignableFrom(lineClass))) {
int maxLines = mixer.getMaxLines(lineInfo);
return ((maxLines == NOT_SPECIFIED) || (maxLines > 1));
}
return true;
}
AudioSystem.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:TuxGuitar-1.3.1-fork
作者:
评论列表
文章目录