public LineControlGroup(final Line underlying) throws LineUnavailableException, Exception
{
if (!underlying.isOpen())
underlying.open();
final FloatControl volumeInput=(FloatControl)new ControlLocator(FloatControl.Type.VOLUME).find(underlying);
if (volumeInput==null)
throw new Exception("Could not find volume control for line \""+underlying.getLineInfo().toString()+"\".");
volume=new FloatControlAdapter(volumeInput);
final StringBuilder log=new StringBuilder();
if (logger.isDebugEnabled())
{
log.append("Instantiated for line \"");
log.append(underlying.getLineInfo().toString());
log.append("\". ");
}
final BooleanControl muteInput=(BooleanControl)new ControlLocator(BooleanControl.Type.MUTE).find(underlying);
if (muteInput==null)
{
mute=null;
if (logger.isDebugEnabled())
log.append("Found volume control but no mute control.");
}
else
{
mute=new BooleanControlAdapter(muteInput);
if (logger.isDebugEnabled())
log.append("Found volume and mute controls.");
}
logger.debug(log.toString());
}
LineControlGroup.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:couch-potato-server
作者:
评论列表
文章目录