Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 28c29e9646
Fetching contributors…

Cannot retrieve contributors at this time

617 lines (547 sloc) 21.909 kB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_11) on Sun Mar 18 17:20:09 CDT 2012 -->
<TITLE>
Music
</TITLE>
<META NAME="date" CONTENT="2012-03-18">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Music";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_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="../../kuusisto/tinysound/Sound.html" title="class in kuusisto.tinysound"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?kuusisto/tinysound/Music.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Music.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;FIELD&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;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
kuusisto.tinysound</FONT>
<BR>
Class Music</H2>
<PRE>
<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>kuusisto.tinysound.Music</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Music</B><DT>extends <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
The Music class is an abstraction for music. Music objects should only be
loaded via the TinySound <code>loadMusic()</code> functions. Music can be
played, paused, resumed, stopped and looped from specified positions.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Finn Kuusisto</DD>
</DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../kuusisto/tinysound/Music.html#Music(byte[], byte[], kuusisto.tinysound.internal.Mixer)">Music</A></B>(byte[]&nbsp;left,
byte[]&nbsp;right,
<A HREF="../../kuusisto/tinysound/internal/Mixer.html" title="class in kuusisto.tinysound.internal">Mixer</A>&nbsp;mixer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new Music with the given music data and the Mixer with which
to register this Music.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../kuusisto/tinysound/Music.html#getLoopPositionByFrame()">getLoopPositionByFrame</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the loop position of this Music by sample frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../kuusisto/tinysound/Music.html#getLoopPositionBySeconds()">getLoopPositionBySeconds</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the loop position of this Music by seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../kuusisto/tinysound/Music.html#getVolume()">getVolume</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the volume of this Music.</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="../../kuusisto/tinysound/Music.html#loop()">loop</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine if this Music will loop.</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="../../kuusisto/tinysound/Music.html#pause()">pause</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stop playing this Music and keep its current position.</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="../../kuusisto/tinysound/Music.html#play(boolean)">play</A></B>(boolean&nbsp;loop)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Play this Music and loop if specified.</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="../../kuusisto/tinysound/Music.html#play(boolean, double)">play</A></B>(boolean&nbsp;loop,
double&nbsp;volume)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Play this Music at the specified volume and loop if specified.</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="../../kuusisto/tinysound/Music.html#playing()">playing</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine if this Music is playing.</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="../../kuusisto/tinysound/Music.html#resume()">resume</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Play this Music from its current position.</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="../../kuusisto/tinysound/Music.html#rewind()">rewind</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set this Music's position to the beginning.</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="../../kuusisto/tinysound/Music.html#rewindToLoopPosition()">rewindToLoopPosition</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set this Music's position to the loop position.</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="../../kuusisto/tinysound/Music.html#setLoop(boolean)">setLoop</A></B>(boolean&nbsp;loop)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set whether this Music will loop.</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="../../kuusisto/tinysound/Music.html#setLoopPositionByFrame(int)">setLoopPositionByFrame</A></B>(int&nbsp;frameIndex)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the loop position of this Music by sample frame.</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="../../kuusisto/tinysound/Music.html#setLoopPositionBySeconds(double)">setLoopPositionBySeconds</A></B>(double&nbsp;seconds)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the loop position of this Music by seconds.</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="../../kuusisto/tinysound/Music.html#setVolume(double)">setVolume</A></B>(double&nbsp;volume)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the volume of this Music.</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="../../kuusisto/tinysound/Music.html#stop()">stop</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stop playing this Music and set its position to the beginning.</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="../../kuusisto/tinysound/Music.html#unload()">unload</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unload this Music from the system.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Music(byte[], byte[], kuusisto.tinysound.internal.Mixer)"><!-- --></A><H3>
Music</H3>
<PRE>
public <B>Music</B>(byte[]&nbsp;left,
byte[]&nbsp;right,
<A HREF="../../kuusisto/tinysound/internal/Mixer.html" title="class in kuusisto.tinysound.internal">Mixer</A>&nbsp;mixer)</PRE>
<DL>
<DD>Construct a new Music with the given music data and the Mixer with which
to register this Music.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>left</CODE> - left channel of music data<DD><CODE>right</CODE> - right channel of music data<DD><CODE>mixer</CODE> - Mixer with which this Music is registered</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="play(boolean)"><!-- --></A><H3>
play</H3>
<PRE>
public void <B>play</B>(boolean&nbsp;loop)</PRE>
<DL>
<DD>Play this Music and loop if specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>loop</CODE> - if this Music should loop</DL>
</DD>
</DL>
<HR>
<A NAME="play(boolean, double)"><!-- --></A><H3>
play</H3>
<PRE>
public void <B>play</B>(boolean&nbsp;loop,
double&nbsp;volume)</PRE>
<DL>
<DD>Play this Music at the specified volume and loop if specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>loop</CODE> - if this Music should loop<DD><CODE>volume</CODE> - the volume to play the this Music</DL>
</DD>
</DL>
<HR>
<A NAME="stop()"><!-- --></A><H3>
stop</H3>
<PRE>
public void <B>stop</B>()</PRE>
<DL>
<DD>Stop playing this Music and set its position to the beginning.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pause()"><!-- --></A><H3>
pause</H3>
<PRE>
public void <B>pause</B>()</PRE>
<DL>
<DD>Stop playing this Music and keep its current position.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="resume()"><!-- --></A><H3>
resume</H3>
<PRE>
public void <B>resume</B>()</PRE>
<DL>
<DD>Play this Music from its current position.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="rewind()"><!-- --></A><H3>
rewind</H3>
<PRE>
public void <B>rewind</B>()</PRE>
<DL>
<DD>Set this Music's position to the beginning.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="rewindToLoopPosition()"><!-- --></A><H3>
rewindToLoopPosition</H3>
<PRE>
public void <B>rewindToLoopPosition</B>()</PRE>
<DL>
<DD>Set this Music's position to the loop position.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="playing()"><!-- --></A><H3>
playing</H3>
<PRE>
public boolean <B>playing</B>()</PRE>
<DL>
<DD>Determine if this Music is playing.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if this Music is playing</DL>
</DD>
</DL>
<HR>
<A NAME="loop()"><!-- --></A><H3>
loop</H3>
<PRE>
public boolean <B>loop</B>()</PRE>
<DL>
<DD>Determine if this Music will loop.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if this Music will loop</DL>
</DD>
</DL>
<HR>
<A NAME="setLoop(boolean)"><!-- --></A><H3>
setLoop</H3>
<PRE>
public void <B>setLoop</B>(boolean&nbsp;loop)</PRE>
<DL>
<DD>Set whether this Music will loop.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>loop</CODE> - whether this Music will loop</DL>
</DD>
</DL>
<HR>
<A NAME="getLoopPositionByFrame()"><!-- --></A><H3>
getLoopPositionByFrame</H3>
<PRE>
public int <B>getLoopPositionByFrame</B>()</PRE>
<DL>
<DD>Get the loop position of this Music by sample frame.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>loop position by sample frame</DL>
</DD>
</DL>
<HR>
<A NAME="getLoopPositionBySeconds()"><!-- --></A><H3>
getLoopPositionBySeconds</H3>
<PRE>
public double <B>getLoopPositionBySeconds</B>()</PRE>
<DL>
<DD>Get the loop position of this Music by seconds.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>loop position by seconds</DL>
</DD>
</DL>
<HR>
<A NAME="setLoopPositionByFrame(int)"><!-- --></A><H3>
setLoopPositionByFrame</H3>
<PRE>
public void <B>setLoopPositionByFrame</B>(int&nbsp;frameIndex)</PRE>
<DL>
<DD>Set the loop position of this Music by sample frame.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>frameIndex</CODE> - sample frame loop position to set</DL>
</DD>
</DL>
<HR>
<A NAME="setLoopPositionBySeconds(double)"><!-- --></A><H3>
setLoopPositionBySeconds</H3>
<PRE>
public void <B>setLoopPositionBySeconds</B>(double&nbsp;seconds)</PRE>
<DL>
<DD>Set the loop position of this Music by seconds.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>seconds</CODE> - loop position to set by seconds</DL>
</DD>
</DL>
<HR>
<A NAME="getVolume()"><!-- --></A><H3>
getVolume</H3>
<PRE>
public double <B>getVolume</B>()</PRE>
<DL>
<DD>Get the volume of this Music.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>volume of this Music</DL>
</DD>
</DL>
<HR>
<A NAME="setVolume(double)"><!-- --></A><H3>
setVolume</H3>
<PRE>
public void <B>setVolume</B>(double&nbsp;volume)</PRE>
<DL>
<DD>Set the volume of this Music.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>volume</CODE> - the desired volume of this Music</DL>
</DD>
</DL>
<HR>
<A NAME="unload()"><!-- --></A><H3>
unload</H3>
<PRE>
public void <B>unload</B>()</PRE>
<DL>
<DD>Unload this Music from the system. Attempts to use this Music after
unloading will result in error.
<P>
<DD><DL>
</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=2 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="../../kuusisto/tinysound/Sound.html" title="class in kuusisto.tinysound"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?kuusisto/tinysound/Music.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Music.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;FIELD&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;FIELD&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>
Jump to Line
Something went wrong with that request. Please try again.