📄 mixer.html
字号:
getMixerInfo</H3><PRE>public <A HREF="../../../javax/sound/sampled/Mixer.Info.html">Mixer.Info</A> <B>getMixerInfo</B>()</PRE><DL><DD>Obtains information about this mixer, including the product's name, version, vendor, etc.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a mixer info object that describes this mixer<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/Mixer.Info.html"><CODE>Mixer.Info</CODE></A></DL></DD></DL><HR><A NAME="getSourceLineInfo()"><!-- --></A><H3>getSourceLineInfo</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[] <B>getSourceLineInfo</B>()</PRE><DL><DD>Obtains information about the set of source lines supported by this mixer.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>array of <code>Line.Info</code> objects representing source lines for this mixer. If no source lines are supported, an array of length 0 is returned.</DL></DD></DL><HR><A NAME="getTargetLineInfo()"><!-- --></A><H3>getTargetLineInfo</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[] <B>getTargetLineInfo</B>()</PRE><DL><DD>Obtains information about the set of target lines supported by this mixer.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>array of <code>Line.Info</code> objects representing target lines for this mixer. If no target lines are supported, an array of length 0 is returned.</DL></DD></DL><HR><A NAME="getSourceLineInfo(javax.sound.sampled.Line.Info)"><!-- --></A><H3>getSourceLineInfo</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[] <B>getSourceLineInfo</B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</PRE><DL><DD>Obtains information about source lines of a particular type supported by the mixer.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>info</CODE> - a <code>Line.Info</code> object describing lines about which information is queried<DT><B>Returns:</B><DD>an array of <code>Line.Info</code> objects describing source lines matching the type requested. If no matching source lines are supported, an array of length 0 is returned.</DL></DD></DL><HR><A NAME="getTargetLineInfo(javax.sound.sampled.Line.Info)"><!-- --></A><H3>getTargetLineInfo</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[] <B>getTargetLineInfo</B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</PRE><DL><DD>Obtains information about target lines of a particular type supported by the mixer.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>info</CODE> - a <code>Line.Info</code> object describing lines about which information is queried<DT><B>Returns:</B><DD>an array of <code>Line.Info</code> objects describing target lines matching the type requested. If no matching target lines are supported, an array of length 0 is returned.</DL></DD></DL><HR><A NAME="isLineSupported(javax.sound.sampled.Line.Info)"><!-- --></A><H3>isLineSupported</H3><PRE>public boolean <B>isLineSupported</B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</PRE><DL><DD>Indicates whether the mixer supports a line (or lines) that match the specified <code>Line.Info</code> object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>info</CODE> - describes the line for which support is queried<DT><B>Returns:</B><DD><code>true</code> if at least one matching line is supported, <code>false</code> otherwise</DL></DD></DL><HR><A NAME="getLine(javax.sound.sampled.Line.Info)"><!-- --></A><H3>getLine</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.html">Line</A> <B>getLine</B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info) throws <A HREF="../../../javax/sound/sampled/LineUnavailableException.html">LineUnavailableException</A></PRE><DL><DD>Obtains a line that is available for use and that matches the description in the specified <code>Line.Info</code> object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>info</CODE> - describes the desired line<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/sound/sampled/LineUnavailableException.html">LineUnavailableException</A></CODE> - if a matching line is not available due to resource restrictions<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if this mixer does not support any lines matching the description<DD><CODE><A HREF="../../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a matching line is not available due to security restrictions</DL></DD></DL><HR><A NAME="getMaxLines(javax.sound.sampled.Line.Info)"><!-- --></A><H3>getMaxLines</H3><PRE>public int <B>getMaxLines</B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</PRE><DL><DD>Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer. The requested type is any line that matches the description in the provided <code>Line.Info</code> object. For example, if the info object represents a speaker port, and the mixer supports exactly one speaker port, this method should return 1. If the info object represents a source data line and the mixer supports the use of 32 source data lines simultaneously, the return value should be 32.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>info</CODE> - a <code>Line.Info</code> that describes the line for which the number of supported instances is queried<DT><B>Returns:</B><DD>the maximum number of matching lines supported</DL></DD></DL><HR><A NAME="getSourceLines()"><!-- --></A><H3>getSourceLines</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] <B>getSourceLines</B>()</PRE><DL><DD>Obtains the set of all source lines currently open to this mixer.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the source lines currently open to the mixer. If no source lines are currently open to this mixer, an array of length 0 is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/SecurityException.html">SecurityException</A></CODE> - if the matching lines are not available due to security restrictions</DL></DD></DL><HR><A NAME="getTargetLines()"><!-- --></A><H3>getTargetLines</H3><PRE>public <A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] <B>getTargetLines</B>()</PRE><DL><DD>Obtains the set of all target lines currently open from this mixer.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>target lines currently open from the mixer. If no target lines are currently open from this mixer, an array of length 0 is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/SecurityException.html">SecurityException</A></CODE> - if the matching lines are not available due to security restrictions</DL></DD></DL><HR><A NAME="synchronize(javax.sound.sampled.Line[], boolean)"><!-- --></A><H3>synchronize</H3><PRE>public void <B>synchronize</B>(<A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] lines, boolean maintainSync)</PRE><DL><DD>Synchronizes two or more lines. Any subsequent command that starts or stops audio playback or capture for one of these lines will exert the same effect on the other lines in the group, so that they start or stop playing or capturing data simultaneously.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>lines</CODE> - the lines that should be synchronized<DD><CODE>maintainSync</CODE> - <code>true</code> if the synchronization must be precisely maintained (i.e., the synchronization must be sample-accurate) at all times during operation of the lines , or <code>false</code> if precise synchronization is required only during start and stop operations<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the lines cannot be synchronized. This may occur if the lines are of different types or have different formats for which this mixer does not support synchronization, or if all lines specified do not belong to this mixer.</DL></DD></DL><HR><A NAME="unsynchronize(javax.sound.sampled.Line[])"><!-- --></A><H3>unsynchronize</H3><PRE>public void <B>unsynchronize</B>(<A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] lines)</PRE><DL><DD>Releases synchronization for the specified lines. The array must be identical to one for which synchronization has already been established; otherwise an exception may be thrown. However, <code>null</code> may be specified, in which case all currently synchronized lines that belong to this mixer are unsynchronized.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>lines</CODE> - the synchronized lines for which synchronization should be released, or <code>null</code> for all this mixer's synchronized lines<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the lines cannot be unsynchronized. This may occur if the argument specified does not exactly match a set of lines for which synchronization has already been established.</DL></DD></DL><HR><A NAME="isSynchronizationSupported(javax.sound.sampled.Line[], boolean)"><!-- --></A><H3>isSynchronizationSupported</H3><PRE>public boolean <B>isSynchronizationSupported</B>(<A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] lines, boolean maintainSync)</PRE><DL><DD>Reports whether this mixer supports synchronization of the specified set of lines.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>lines</CODE> - the set of lines for which synchronization support is queried<DD><CODE>maintainSync</CODE> - <code>true</code> if the synchronization must be precisely maintained (i.e., the synchronization must be sample-accurate) at all times during operation of the lines , or <code>false</code> if precise synchronization is required only during start and stop operations<DT><B>Returns:</B><DD><code>true</code> if the lines can be synchronized, <code>false</code> otherwise</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Mixer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/sound/sampled/LineListener.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/sound/sampled/Port.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Mixer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -