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

📄 audioclip.html

📁 对于想学习三星手机开发的人来说
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="TYPE_MMF"><!-- --></A><H3>
TYPE_MMF</H3>
<PRE>
public static final int <B>TYPE_MMF</B></PRE>
<DL>
<DD>The "MMF" audio type constant. <P>Value <code>1</code> is assigned to <code>TYPE_MMF</code>.</P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.samsung.util.AudioClip.TYPE_MMF">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="TYPE_MP3"><!-- --></A><H3>
TYPE_MP3</H3>
<PRE>
public static final int <B>TYPE_MP3</B></PRE>
<DL>
<DD>The "MP3" audio type constant. Current devices only support TYPE_MMF. <P>Value <code>2</code> is assigned to <code>TYPE_MP3</code>.</P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.samsung.util.AudioClip.TYPE_MP3">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="TYPE_MIDI"><!-- --></A><H3>
TYPE_MIDI</H3>
<PRE>
public static final int <B>TYPE_MIDI</B></PRE>
<DL>
<DD>The "MIDI" audio type constant. Current devices only support TYPE_MMF. <P>Value <code>3</code> is assigned to <code>TYPE_MIDI</code>.</P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.samsung.util.AudioClip.TYPE_MIDI">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="AudioClip(int, byte[], int, int)"><!-- --></A><H3>
AudioClip</H3>
<PRE>
public <B>AudioClip</B>(int&nbsp;type,                 byte[]&nbsp;audioData,                 int&nbsp;audioOffset,                 int&nbsp;audioLength)</PRE>
<DL>
<DD>Constructs a new instance of <code>AudioClip</code> with type and data which stored in  the specified byte array at the specified offset and length.
<P>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - one of <code>TYPE_MMF, TYPE_MP3, or TYPE_MIDI</code>, Current devices only support TYPE_MMF.<DD><CODE>audioData</CODE> - the array of audio data in a supported audio format<DD><CODE>audioOffset</CODE> - offset of audio data<DD><CODE>audioLength</CODE> - length of audio data<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>type</code> is not legal values<DD><CODE>java.lang.NullPointerException</CODE> - if <code>audioData</code> is <code>null</code><DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if <code>audioOffset</code> or <code>audioLength</code> specify an invalid range</DL>
<HR>

<A NAME="AudioClip(int, java.lang.String)"><!-- --></A><H3>
AudioClip</H3>
<PRE>
public <B>AudioClip</B>(int&nbsp;type,                 java.lang.String&nbsp;filename)          throws java.io.IOException</PRE>
<DL>
<DD>Constructs a new instance of <code>AudioClip</code> with type and data from the named resource.
<P>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - one of <code>TYPE_MMF, TYPE_MP3, or TYPE_MIDI</code>, Current devices only support TYPE_MMF.<DD><CODE>filename</CODE> - the name of the resource containing the audio data in one of the supported audio formats<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>type</code> is not legal values<DD><CODE>java.lang.NullPointerException</CODE> - if <code>filename</code> is <code>null</code><DD><CODE>java.io.IOException</CODE> - if the resource does not exist</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="play(int, int)"><!-- --></A><H3>
play</H3>
<PRE>
public void <B>play</B>(int&nbsp;loop,                 int&nbsp;volume)</PRE>
<DL>
<DD>Plays audio with specified volume for specified loop. Only one AudioClip can be heared at the same time. Active AudioClip will be replaced with latest called clip if more than one clip are played.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>loop</CODE> - range 0 to 255<DD><CODE>volume</CODE> - range from 0 to 5<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - Thrown if <code>loop</code>, or <code>volume</code> are invalid value.<DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the device does not support <code>AudioClip</code></DL>
</DD>
</DL>
<HR>

<A NAME="stop()"><!-- --></A><H3>
stop</H3>
<PRE>
public void <B>stop</B>()</PRE>
<DL>
<DD>Stops the audio and releases its resources. <p> If <code>stop</code> is called on a stopped <code>AudioClip</code> the request is ignored.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the device does not support <code>AudioClip</code></DL>
</DD>
</DL>
<HR>

<A NAME="pause()"><!-- --></A><H3>
pause</H3>
<PRE>
public void <B>pause</B>()</PRE>
<DL>
<DD>Pauses audio. The current position is saved. Use the <code>resume()</code> to resume audio from the current position.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the device does not support <code>AudioClip</code><DT><B>See Also:</B><DD><A HREF="../../../com/samsung/util/AudioClip.html#resume()"><CODE>resume</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="resume()"><!-- --></A><H3>
resume</H3>
<PRE>
public void <B>resume</B>()</PRE>
<DL>
<DD>Resumes audio on a paused position.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the device does not support <code>AudioClip</code><DT><B>See Also:</B><DD><A HREF="../../../com/samsung/util/AudioClip.html#pause()"><CODE>pause</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="isSupported()"><!-- --></A><H3>
isSupported</H3>
<PRE>
public static boolean <B>isSupported</B>()</PRE>
<DL>
<DD>Gets an information whether audio clip is supported by the device.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if the <code>AudioClip</code> is supported.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <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="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-all.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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../com/samsung/util/LCDLight.html" title="class in com.samsung.util"><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="AudioClip.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&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>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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