⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 line.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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  Line</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Line.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/sound/sampled/DataLine.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/sound/sampled/LineListener.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>  &nbsp;&nbsp;<A HREF="Line.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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  Line</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/sound/sampled/Clip.html">Clip</A>, <A HREF="../../../javax/sound/sampled/DataLine.html">DataLine</A>, <A HREF="../../../javax/sound/sampled/Mixer.html">Mixer</A>, <A HREF="../../../javax/sound/sampled/Port.html">Port</A>, <A HREF="../../../javax/sound/sampled/SourceDataLine.html">SourceDataLine</A>, <A HREF="../../../javax/sound/sampled/TargetDataLine.html">TargetDataLine</A></DD></DL><HR><DL><DT>public interface <B>Line</B></DL><P>The <code>Line</code> interface represents a mono or multi-channel audio feed. A line is an element of the digital audio  "pipeline," such as a mixer, an input or output port, or a data path into or out of a mixer.   <p> A line can have controls, such as gain, pan, and reverb.    The controls themselves are instances of classes that extend the  base <code><A HREF="../../../javax/sound/sampled/Control.html"><CODE>Control</CODE></A></code> class.   The <code>Line</code> interface provides two accessor methods for obtaining the line's controls: <code><A HREF="../../../javax/sound/sampled/Line.html#getControls()"><CODE>getControls</CODE></A></code> returns the  entire set, and <code><A HREF="../../../javax/sound/sampled/Line.html#getControl(javax.sound.sampled.Control.Type)"><CODE>getControl</CODE></A></code> returns a single control of specified type.  <p> Lines exist in various states at different times.  When a line opens, it reserves system resources for itself, and when it closes, these resources are freed for  other objects or applications. The <code><A HREF="../../../javax/sound/sampled/Line.html#isOpen()"><CODE>isOpen()</CODE></A></code> method lets you discover whether a line is open or closed. An open line need not be processing data, however.  Such processing is  typically initiated by subinterface methods such as  <code><A HREF="../../../javax/sound/sampled/SourceDataLine.html#write(byte[], int, int)"><CODE>SourceDataLine.write</CODE></A></code> and <code><A HREF="../../../javax/sound/sampled/TargetDataLine.html#read(byte[], int, int)"><CODE>TargetDataLine.read</CODE></A></code>.<p> You can register an object to receive notifications whenever the line's  state changes.  The object must implement the <code><A HREF="../../../javax/sound/sampled/LineListener.html"><CODE>LineListener</CODE></A></code> interface, which consists of the single method  <code><A HREF="../../../javax/sound/sampled/LineListener.html#update(javax.sound.sampled.LineEvent)"><CODE>update</CODE></A></code>. This method will be invoked when a line opens and closes (and, if it's a  <A HREF="../../../javax/sound/sampled/DataLine.html"><CODE>DataLine</CODE></A>, when it starts and stops).   <p> An object can be registered to listen to multiple lines.  The event it  receives in its <code>update</code> method will specify which line created the event, what type of event it was  (<code>OPEN</code>, <code>CLOSE</code>, <code>START</code>, or <code>STOP</code>),  and how many sample frames the line had processed at the time the event occurred. <p> Certain line operations, such as open and close, can generate security  exceptions if invoked by unprivileged code when the line is a shared audio  resource.<P><DL><DT><B>Since: </B><DD>1.3</DD><DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/LineEvent.html"><CODE>LineEvent</CODE></A></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&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A <code>Line.Info</code> object contains information about a line.</TD></TR></TABLE>&nbsp;<!-- =========== 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#addLineListener(javax.sound.sampled.LineListener)">addLineListener</A></B>(<A HREF="../../../javax/sound/sampled/LineListener.html">LineListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener to this line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#close()">close</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the line, indicating that any system resources in use by the line can be released.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/sampled/Control.html">Control</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#getControl(javax.sound.sampled.Control.Type)">getControl</A></B>(<A HREF="../../../javax/sound/sampled/Control.Type.html">Control.Type</A>&nbsp;control)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains a control of the specified type, if there is any.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/sampled/Control.html">Control</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#getControls()">getControls</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the set of controls associated with this line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/sampled/Line.Info.html">Line.Info</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#getLineInfo()">getLineInfo</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the <code>Line.Info</code> object describing this line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#isControlSupported(javax.sound.sampled.Control.Type)">isControlSupported</A></B>(<A HREF="../../../javax/sound/sampled/Control.Type.html">Control.Type</A>&nbsp;control)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether the line supports a control of the specified type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#isOpen()">isOpen</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether the line is open, meaning that it has reserved system resources and is operational, although it might not currently be  playing or capturing sound.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#open()">open</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens the line, indicating that it should acquire any required system resources and become operational.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/sampled/Line.html#removeLineListener(javax.sound.sampled.LineListener)">removeLineListener</A></B>(<A HREF="../../../javax/sound/sampled/LineListener.html">LineListener</A>&nbsp;listener)</CODE><BR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -