438 lines
19 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.sound.sampled
</div>
<h2 class="title" title="Class Port.Info">Class Port.Info</h2>
</div><div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">javax.sound.sampled.Line.Info</a></li>
<li>
<ul class="inheritance">
<li>javax.sound.sampled.Port.Info</li>
</ul> </li>
</ul> </li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
Enclosing interface:
</dt>
<dd>
<span><a href="../../../javax/sound/sampled/Port.html" title="javax.sound.sampled中的接口">Port</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public static class <span class="typeNameLabel">Port.Info</span>
extends <a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">Line.Info</a></pre>
<div class="block">
<span><code>Port.Info</code>类扩展<code><a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled"><code>Line.Info</code></a></code>与特定端口的其他信息,包括端口的名称,无论是源还是其混频器的目标。</span>
<span>根据定义,端口作为其混合器的源或目标,但不是两者。</span>
<span>(音频输入端口是源;音频输出端口是目标。)</span>
<p> <span>要了解可用的端口,你可以获取端口信息通过对象<code><a href="../../../javax/sound/sampled/Mixer.html#getSourceLineInfo--"><code>getSourceLineInfo</code></a></code><code><a href="../../../javax/sound/sampled/Mixer.html#getTargetLineInfo--"><code>getTargetLineInfo</code></a></code>的方法<code>Mixer</code>接口。</span> <span>所述的实例<code>Port.Info</code>类也可以被构造并用于获得匹配在指定的参数线<code>Port.Info</code>对象。</span> </p>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.3
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- --> </a> <h3>Field Summary</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
<caption>
<span>Fields</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#COMPACT_DISC">COMPACT_DISC</a></span></code>
<div class="block">
一种从CD-ROM驱动器获取音频的端口。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#HEADPHONE">HEADPHONE</a></span></code>
<div class="block">
一种将音频发送到耳机插孔的端口。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#LINE_IN">LINE_IN</a></span></code>
<div class="block">
一种从线路级音频输入插孔获取音频的端口。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#LINE_OUT">LINE_OUT</a></span></code>
<div class="block">
一种将音频发送到线路级音频输出插孔的端口。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#MICROPHONE">MICROPHONE</a></span></code>
<div class="block">
一种从内置麦克风或麦克风插孔获取音频的端口。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#SPEAKER">SPEAKER</a></span></code>
<div class="block">
一种将音频发送到内置扬声器或扬声器插孔的端口。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- --> </a> <h3>构造方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption>
<span>构造方法</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#Info-java.lang.Class-java.lang.String-boolean-">Info</a></span>(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; lineClass, <a href="../../../java/lang/String.html" title="class in java.lang">String</a> name, boolean isSource)</code>
<div class="block">
根据给出的信息构造端口的信息对象。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t4"><span><a href="javascript:show(8);">具体的方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#equals-java.lang.Object-">equals</a></span>(<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> obj)</code>
<div class="block">
完成equals方法
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="../../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#getName--">getName</a></span>()</code>
<div class="block">
获取端口的名称。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#hashCode--">hashCode</a></span>()</code>
<div class="block">
完成hashCode方法
</div> </td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#isSource--">isSource</a></span>()</code>
<div class="block">
指示端口是混合器的源还是目标。
</div> </td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#matches-javax.sound.sampled.Line.Info-">matches</a></span>(<a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">Line.Info</a> info)</code>
<div class="block">
指示此信息对象是否与此匹配。
</div> </td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code><a href="../../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/sound/sampled/Port.Info.html#toString--">toString</a></span>()</code>
<div class="block">
提供端口的
<code>String</code>表示。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.sound.sampled.Line.Info">
<!-- --> </a> <h3>Methods inherited from class javax.sound.sampled.<a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">Line.Info</a></h3> <code><a href="../../../javax/sound/sampled/Line.Info.html#getLineClass--">getLineClass</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- --> </a> <h3>Methods inherited from class java.lang.<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></h3> <code><a href="../../../java/lang/Object.html#clone--">clone</a>, <a href="../../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../../java/lang/Object.html#notify--">notify</a>, <a href="../../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../../java/lang/Object.html#wait--">wait</a>, <a href="../../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- --> </a> <h3>字段详细信息</h3> <a name="MICROPHONE">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>MICROPHONE</h4> <pre>public static final <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a> MICROPHONE</pre>
<div class="block">
一种从内置麦克风或麦克风插孔获取音频的端口。
</div> </li>
</ul> <a name="LINE_IN">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>LINE_IN</h4> <pre>public static final <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a> LINE_IN</pre>
<div class="block">
一种从线路级音频输入插孔获取音频的端口。
</div> </li>
</ul> <a name="COMPACT_DISC">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>COMPACT_DISC</h4> <pre>public static final <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a> COMPACT_DISC</pre>
<div class="block">
一种从CD-ROM驱动器获取音频的端口。
</div> </li>
</ul> <a name="SPEAKER">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>SPEAKER</h4> <pre>public static final <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a> SPEAKER</pre>
<div class="block">
一种将音频发送到内置扬声器或扬声器插孔的端口。
</div> </li>
</ul> <a name="HEADPHONE">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>HEADPHONE</h4> <pre>public static final <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a> HEADPHONE</pre>
<div class="block">
一种将音频发送到耳机插孔的端口。
</div> </li>
</ul> <a name="LINE_OUT">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>LINE_OUT</h4> <pre>public static final <a href="../../../javax/sound/sampled/Port.Info.html" title="class in javax.sound.sampled">Port.Info</a> LINE_OUT</pre>
<div class="block">
一种将音频发送到线路级音频输出插孔的端口。
</div> </li>
</ul> </li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- --> </a> <h3>构造方法详细信息</h3> <a name="Info-java.lang.Class-java.lang.String-boolean-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>Info</h4> <pre>public Info(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; lineClass,
<a href="../../../java/lang/String.html" title="class in java.lang">String</a> name,
boolean isSource)</pre>
<div class="block">
<span>根据给出的信息构造端口的信息对象。</span>
<span>该构造函数通常由Java Sound的实现来描述支持的行。</span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>lineClass</code> - 由info对象描述的端口的类。
</dd>
<dd>
<code>name</code> - 命名端口的字符串
</dd>
<dd>
<code>isSource</code> -
<code>true</code>如果端口是源端口(如麦克风),
<code>false</code>如果端口是目标端口(如扬声器)。
</dd>
</dl> </li>
</ul> </li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="getName--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getName</h4> <pre>public <a href="../../../java/lang/String.html" title="class in java.lang">String</a> getName()</pre>
<div class="block">
获取端口的名称。
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
命名端口的字符串
</dd>
</dl> </li>
</ul> <a name="isSource--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>isSource</h4> <pre>public boolean isSource()</pre>
<div class="block">
指示端口是混合器的源还是目标。
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<code>true</code>如果端口是源端口(如麦克风),
<code>false</code>如果端口是目标端口(如扬声器)。
</dd>
</dl> </li>
</ul> <a name="matches-javax.sound.sampled.Line.Info-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>matches</h4> <pre>public boolean matches(<a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">Line.Info</a> info)</pre>
<div class="block">
<span>指示此信息对象是否与此匹配。</span>
<span>要匹配,必须满足超类的匹配要求,并且类型必须相等。</span>
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../javax/sound/sampled/Line.Info.html#matches-javax.sound.sampled.Line.Info-">matches</a></code>在类别
<code><a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">Line.Info</a></code>
</dd>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>info</code> - 查询匹配的信息对象
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<code>true</code>如果指定的对象与此匹配,
<code>false</code> false
</dd>
</dl> </li>
</ul> <a name="equals-java.lang.Object-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>equals</h4> <pre>public final boolean equals(<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> obj)</pre>
<div class="block">
完成equals方法
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../java/lang/Object.html#equals-java.lang.Object-">equals</a></code>在类别
<code><a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></code>
</dd>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>obj</code> - 用于比较的参考对象。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<span><code>true</code>如果此对象与obj参数相同;</span>
<span><code>false</code>否则。</span>
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<span><a href="../../../java/lang/Object.html#hashCode--"><code>Object.hashCode()</code></a> <a href="../../../java/util/HashMap.html" title="java.util中的类"><code>HashMap</code></a></span>
</dd>
</dl> </li>
</ul> <a name="hashCode--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>hashCode</h4> <pre>public final int hashCode()</pre>
<div class="block">
完成hashCode方法
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../java/lang/Object.html#hashCode--">hashCode</a></code>在类别
<code><a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></code>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
该对象的哈希码值。
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<a href="../../../java/lang/Object.html#equals-java.lang.Object-"><code>Object.equals(java.lang.Object)</code></a>
<a href="../../../java/lang/System.html#identityHashCode-java.lang.Object-"><code>System.identityHashCode(java.lang.Object)</code></a>
</dd>
</dl> </li>
</ul> <a name="toString--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>toString</h4> <pre>public final <a href="../../../java/lang/String.html" title="class in java.lang">String</a> toString()</pre>
<div class="block">
提供端口的
<code>String</code>表示。
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../javax/sound/sampled/Line.Info.html#toString--">toString</a></code>在类别
<code><a href="../../../javax/sound/sampled/Line.Info.html" title="class in javax.sound.sampled">Line.Info</a></code>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
一个描述端口的字符串
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>