📄 mixer.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:37:54 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface Mixer</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.sound.sampled</FONT><BR>Interface Mixer</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/sound/sampled/Line.html">Line</A></DD></DL><HR><DL><DT>public interface <B>Mixer</B><DT>extends <A HREF="../../../javax/sound/sampled/Line.html">Line</A></DL><P>A mixer is an audio device with one or more lines. It need not be designed for mixing audio signals. A mixer that actually mixes audio has multiple input (source) lines and at least one output (target) line. The former are often instances of classes that implement <code><A HREF="../../../javax/sound/sampled/SourceDataLine.html"><CODE>SourceDataLine</CODE></A></code>, and the latter, <code><A HREF="../../../javax/sound/sampled/TargetDataLine.html"><CODE>TargetDataLine</CODE></A></code>. <code><A HREF="../../../javax/sound/sampled/Port.html"><CODE>Port</CODE></A></code> objects, too, are either source lines or target lines. A mixer can accept prerecorded, loopable sound as input, by having some of its source lines be instances of objects that implement the <code><A HREF="../../../javax/sound/sampled/Clip.html"><CODE>Clip</CODE></A></code> interface. <p> Through methods of the <code>Line</code> interface, which <code>Mixer</code> extends, a mixer might provide a set of controls that are global to the mixer. For example, the mixer can have a master gain control. These global controls are distinct from the controls belonging to each of the mixer's individual lines. <p> Some mixers, especially those with internal digital mixing capabilities, may provide additional capabilities by implementing the <code>DataLine</code> interface. <p> A mixer can support synchronization of its lines. When one line in a synchronized group is started or stopped, the other lines in the group automatically start or stop simultaneously with the explicitly affected one.<P><DL><DT><B>Since: </B><DD>1.3</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_class_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Inner Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.Info.html">Mixer.Info</A></B></CODE><BR> The <code>Mixer.Info</code> class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.</TD></TR></TABLE> <A NAME="inner_classes_inherited_from_class_javax.sound.sampled.Line"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Inner classes inherited from class javax.sound.sampled.<A HREF="../../../javax/sound/sampled/Line.html">Line</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A></CODE></TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.html">Line</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getLine(javax.sound.sampled.Line.Info)">getLine</A></B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</CODE><BR> Obtains a line that is available for use and that matches the description in the specified <code>Line.Info</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getMaxLines(javax.sound.sampled.Line.Info)">getMaxLines</A></B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</CODE><BR> Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Mixer.Info.html">Mixer.Info</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getMixerInfo()">getMixerInfo</A></B>()</CODE><BR> Obtains information about this mixer, including the product's name, version, vendor, etc.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getSourceLineInfo()">getSourceLineInfo</A></B>()</CODE><BR> Obtains information about the set of source lines supported by this mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getSourceLineInfo(javax.sound.sampled.Line.Info)">getSourceLineInfo</A></B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</CODE><BR> Obtains information about source lines of a particular type supported by the mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.html">Line</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getSourceLines()">getSourceLines</A></B>()</CODE><BR> Obtains the set of all source lines currently open to this mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getTargetLineInfo()">getTargetLineInfo</A></B>()</CODE><BR> Obtains information about the set of target lines supported by this mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getTargetLineInfo(javax.sound.sampled.Line.Info)">getTargetLineInfo</A></B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</CODE><BR> Obtains information about target lines of a particular type supported by the mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/sound/sampled/Line.html">Line</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#getTargetLines()">getTargetLines</A></B>()</CODE><BR> Obtains the set of all target lines currently open from this mixer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#isLineSupported(javax.sound.sampled.Line.Info)">isLineSupported</A></B>(<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A> info)</CODE><BR> Indicates whether the mixer supports a line (or lines) that match the specified <code>Line.Info</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#isSynchronizationSupported(javax.sound.sampled.Line[], boolean)">isSynchronizationSupported</A></B>(<A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] lines, boolean maintainSync)</CODE><BR> Reports whether this mixer supports synchronization of the specified set of lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#synchronize(javax.sound.sampled.Line[], boolean)">synchronize</A></B>(<A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] lines, boolean maintainSync)</CODE><BR> Synchronizes two or more lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Mixer.html#unsynchronize(javax.sound.sampled.Line[])">unsynchronize</A></B>(<A HREF="../../../javax/sound/sampled/Line.html">Line</A>[] lines)</CODE><BR> Releases synchronization for the specified lines.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.sound.sampled.Line"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.sound.sampled.<A HREF="../../../javax/sound/sampled/Line.html">Line</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/sound/sampled/Line.html#addLineListener(javax.sound.sampled.LineListener)">addLineListener</A>, <A HREF="../../../javax/sound/sampled/Line.html#close()">close</A>, <A HREF="../../../javax/sound/sampled/Line.html#getControl(javax.sound.sampled.Control.Type)">getControl</A>, <A HREF="../../../javax/sound/sampled/Line.html#getControls()">getControls</A>, <A HREF="../../../javax/sound/sampled/Line.html#getLineInfo()">getLineInfo</A>, <A HREF="../../../javax/sound/sampled/Line.html#isControlSupported(javax.sound.sampled.Control.Type)">isControlSupported</A>, <A HREF="../../../javax/sound/sampled/Line.html#isOpen()">isOpen</A>, <A HREF="../../../javax/sound/sampled/Line.html#open()">open</A>, <A HREF="../../../javax/sound/sampled/Line.html#removeLineListener(javax.sound.sampled.LineListener)">removeLineListener</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getMixerInfo()"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -