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

📄 audioformat.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian audio data".</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</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#hashCode()">hashCode</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></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="encoding"><!-- --></A><H3>encoding</H3><PRE>protected <A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html">AudioFormat.Encoding</A> <B>encoding</B></PRE><DL><DD>The audio encoding technique used by this format.</DL><HR><A NAME="sampleRate"><!-- --></A><H3>sampleRate</H3><PRE>protected float <B>sampleRate</B></PRE><DL><DD>The number of samples played or recorded per second, for sounds that have this format.</DL><HR><A NAME="sampleSizeInBits"><!-- --></A><H3>sampleSizeInBits</H3><PRE>protected int <B>sampleSizeInBits</B></PRE><DL><DD>The number of bits in each sample of a sound that has this format.</DL><HR><A NAME="channels"><!-- --></A><H3>channels</H3><PRE>protected int <B>channels</B></PRE><DL><DD>The number of audio channels in this format (1 for mono, 2 for stereo).</DL><HR><A NAME="frameSize"><!-- --></A><H3>frameSize</H3><PRE>protected int <B>frameSize</B></PRE><DL><DD>The number of bytes in each frame of a sound that has this format.</DL><HR><A NAME="frameRate"><!-- --></A><H3>frameRate</H3><PRE>protected float <B>frameRate</B></PRE><DL><DD>The number of frames played or recorded per second, for sounds that have this format.</DL><HR><A NAME="bigEndian"><!-- --></A><H3>bigEndian</H3><PRE>protected boolean <B>bigEndian</B></PRE><DL><DD>Indicates whether the audio data is stored in big-endian or little-endian order.</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(javax.sound.sampled.AudioFormat.Encoding, float, int, int, int, float, boolean)"><!-- --></A><H3>AudioFormat</H3><PRE>public <B>AudioFormat</B>(<A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html">AudioFormat.Encoding</A>&nbsp;encoding,                   float&nbsp;sampleRate,                   int&nbsp;sampleSizeInBits,                   int&nbsp;channels,                   int&nbsp;frameSize,                   float&nbsp;frameRate,                   boolean&nbsp;bigEndian)</PRE><DL><DD>Constructs an <code>AudioFormat</code> with the given parameters.   The encoding specifies the convention used to represent the data. The other parameters are further explained in the <A HREF="../../../javax/sound/sampled/AudioFormat.html"><CODE>class description</CODE></A>.<DD><DL><DT><B>Parameters:</B><DD><CODE>encoding</CODE> - the audio encoding technique<DD><CODE>sampleRate</CODE> - the number of samples per second<DD><CODE>sampleSizeInBits</CODE> - the number of bits in each sample<DD><CODE>channels</CODE> - the number of channels (1 for mono, 2 for stereo, and so on)<DD><CODE>frameSize</CODE> - the number of bytes in each frame<DD><CODE>frameRate</CODE> - the number of frames per second<DD><CODE>bigEndian</CODE> - indicates whether the data for a single sample 							is stored in big-endian byte order (<code>false</code> 							means little-endian)</DL></DD></DL><HR><A NAME="AudioFormat(float, int, int, boolean, boolean)"><!-- --></A><H3>AudioFormat</H3><PRE>public <B>AudioFormat</B>(float&nbsp;sampleRate,                   int&nbsp;sampleSizeInBits,                   int&nbsp;channels,                   boolean&nbsp;signed,                   boolean&nbsp;bigEndian)</PRE><DL><DD>Constructs an <code>AudioFormat</code> with a linear PCM encoding and the given parameters.  The frame size is set to the number of bytes required to contain one sample from each channel, and the frame rate is set to the sample rate.<DD><DL><DT><B>Parameters:</B><DD><CODE>sampleRate</CODE> - the number of samples per second<DD><CODE>sampleSizeInBits</CODE> - the number of bits in each sample<DD><CODE>channels</CODE> - the number of channels (1 for mono, 2 for stereo, and so on)<DD><CODE>signed</CODE> - indicates whether the data is signed or unsigned<DD><CODE>bigEndian</CODE> - indicates whether the data for a single sample 							is stored in big-endian byte order (<code>false</code> 							means little-endian)</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="getEncoding()"><!-- --></A><H3>getEncoding</H3><PRE>public <A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html">AudioFormat.Encoding</A> <B>getEncoding</B>()</PRE><DL><DD>Obtains the type of encoding for sounds in this format.<DD><DL><DT><B>Returns:</B><DD>the encoding type<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html#PCM_SIGNED"><CODE>AudioFormat.Encoding.PCM_SIGNED</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html#PCM_UNSIGNED"><CODE>AudioFormat.Encoding.PCM_UNSIGNED</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html#ULAW"><CODE>AudioFormat.Encoding.ULAW</CODE></A>, <A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.html#ALAW"><CODE>AudioFormat.Encoding.ALAW</CODE></A></DL></DD></DL><HR><A NAME="getSampleRate()"><!-- --></A><H3>getSampleRate</H3><PRE>public float <B>getSampleRate</B>()</PRE><DL><DD>Obtains the sample rate.<DD><DL><DT><B>Returns:</B><DD>the number of samples per second<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioFormat.html#getFrameRate()"><CODE>getFrameRate()</CODE></A></DL></DD></DL><HR><A NAME="getSampleSizeInBits()"><!-- --></A><H3>getSampleSizeInBits</H3><PRE>public int <B>getSampleSizeInBits</B>()</PRE><DL><DD>Obtains the size of a sample.<DD><DL><DT><B>Returns:</B><DD>the number of bits in each sample<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioFormat.html#getFrameSize()"><CODE>getFrameSize()</CODE></A></DL></DD></DL><HR><A NAME="getChannels()"><!-- --></A><H3>getChannels</H3><PRE>public int <B>getChannels</B>()</PRE><DL><DD>Obtains the number of channels.<DD><DL><DT><B>Returns:</B><DD>The number of channels (1 for mono, 2 for stereo, etc.)</DL></DD></DL><HR><A NAME="getFrameSize()"><!-- --></A><H3>getFrameSize</H3><PRE>public int <B>getFrameSize</B>()</PRE><DL><DD>Obtains the frame size in bytes.<DD><DL><DT><B>Returns:</B><DD>the number of bytes per frame<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioFormat.html#getSampleSizeInBits()"><CODE>getSampleSizeInBits()</CODE></A></DL></DD></DL><HR><A NAME="getFrameRate()"><!-- --></A><H3>getFrameRate</H3><PRE>public float <B>getFrameRate</B>()</PRE><DL><DD>Obtains the frame rate in frames per second.<DD><DL><DT><B>Returns:</B><DD>the number of frames per second<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/sampled/AudioFormat.html#getSampleRate()"><CODE>getSampleRate()</CODE></A></DL></DD></DL><HR><A NAME="isBigEndian()"><!-- --></A><H3>isBigEndian</H3><PRE>public boolean <B>isBigEndian</B>()</PRE><DL><DD>Indicates whether the audio data is stored in big-endian or little-endian byte order.  If the sample size is not more than one byte, the return value is irrelevant.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if the data is stored in big-endian byte order,  <code>false</code> if little-endian</DL></DD></DL><HR><A NAME="matches(javax.sound.sampled.AudioFormat)"><!-- --></A><H3>matches</H3><PRE>public boolean <B>matches</B>(<A HREF="../../../javax/sound/sampled/AudioFormat.html">AudioFormat</A>&nbsp;format)</PRE><DL><DD>Indicates whether this format matches the one specified.  To match, two formats must have the same encoding, the same number of channels, and the same number of bits per sample and bytes per frame. The two formats must also have the same sample rate, unless the specified format has the sample rate value <code>AudioSystem.NOT_SPECIFIED</code>,  which any sample rate will match.  The frame rates must similarly be equal, unless the specified format has the frame rate value <code>AudioSystem.NOT_SPECIFIED</code>.  The byte order (big-endian or little-endian) must match if the sample size is greater than one byte.<DD><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - format to test for match<DT><B>Returns:</B><DD><code>true</code> if this format matches the one specified,  <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian audio data".  The contents of the string may vary between implementations of Java Sound.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a string that describes the format parameters</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>&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/AudioFormat.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/AudioFileFormat.Type.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/sound/sampled/AudioFormat.Encoding.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;<A HREF="#inner_class_summary">INNER</A>&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="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 + -