mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
Former-commit-id: 9340873f9cfb15264004c32d6e4b8f8bd6828d94 Former-commit-id: 1916747c109876aa064412e01204c3aeda9bbbc0
691 lines
24 KiB
HTML
691 lines
24 KiB
HTML
<!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_34) on Mon Jun 03 22:20:31 BST 2013 -->
|
|
<TITLE>
|
|
Music (Slick - The 2D Library)
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2013-06-03">
|
|
|
|
<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 (Slick - The 2D Library)";
|
|
}
|
|
}
|
|
</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> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Music.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../org/newdawn/slick/MouseListener.html" title="interface in org.newdawn.slick"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../org/newdawn/slick/MusicListener.html" title="interface in org.newdawn.slick"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?org/newdawn/slick/Music.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Music.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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">
|
|
org.newdawn.slick</FONT>
|
|
<BR>
|
|
Class Music</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.newdawn.slick.Music</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>Music</B><DT>extends java.lang.Object</DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A piece of music loaded and playable within the game. Only one piece of music can
|
|
play at any given time and a channel is reserved so music will always play.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>kevin, Nathan Sweet <misc@n4te.com></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="../../../org/newdawn/slick/Music.html#Music(java.io.InputStream, java.lang.String)">Music</A></B>(java.io.InputStream in,
|
|
java.lang.String ref)</CODE>
|
|
|
|
<BR>
|
|
Create and load a piece of music (either OGG or MOD/XM)</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#Music(java.lang.String)">Music</A></B>(java.lang.String ref)</CODE>
|
|
|
|
<BR>
|
|
Create and load a piece of music (either OGG or MOD/XM)</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#Music(java.lang.String, boolean)">Music</A></B>(java.lang.String ref,
|
|
boolean streamingHint)</CODE>
|
|
|
|
<BR>
|
|
Create and load a piece of music (either OGG or MOD/XM)</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#Music(java.net.URL)">Music</A></B>(java.net.URL ref)</CODE>
|
|
|
|
<BR>
|
|
Create and load a piece of music (either OGG or MOD/XM)</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#Music(java.net.URL, boolean)">Music</A></B>(java.net.URL url,
|
|
boolean streamingHint)</CODE>
|
|
|
|
<BR>
|
|
Create and load a piece of music (either OGG or MOD/XM)</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== 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> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#addListener(org.newdawn.slick.MusicListener)">addListener</A></B>(<A HREF="../../../org/newdawn/slick/MusicListener.html" title="interface in org.newdawn.slick">MusicListener</A> listener)</CODE>
|
|
|
|
<BR>
|
|
Add a listener to this music</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#fade(int, float, boolean)">fade</A></B>(int duration,
|
|
float endVolume,
|
|
boolean stopAfterFade)</CODE>
|
|
|
|
<BR>
|
|
Fade this music to the volume specified</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> float</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#getPosition()">getPosition</A></B>()</CODE>
|
|
|
|
<BR>
|
|
The position into the sound thats being played</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> float</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#getVolume()">getVolume</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get the individual volume of the music</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#loop()">loop</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Loop the music</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#loop(float, float)">loop</A></B>(float pitch,
|
|
float volume)</CODE>
|
|
|
|
<BR>
|
|
Loop the music at a given pitch and volume</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#pause()">pause</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Pause the music playback</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#play()">play</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Play the music</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#play(float, float)">play</A></B>(float pitch,
|
|
float volume)</CODE>
|
|
|
|
<BR>
|
|
Play the music at a given pitch and volume</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#playing()">playing</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Check if the music is being played</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#poll(int)">poll</A></B>(int delta)</CODE>
|
|
|
|
<BR>
|
|
Poll the state of the current music.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#removeListener(org.newdawn.slick.MusicListener)">removeListener</A></B>(<A HREF="../../../org/newdawn/slick/MusicListener.html" title="interface in org.newdawn.slick">MusicListener</A> listener)</CODE>
|
|
|
|
<BR>
|
|
Remove a listener from this music</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#resume()">resume</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Resume the music playback</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#setPosition(float)">setPosition</A></B>(float position)</CODE>
|
|
|
|
<BR>
|
|
Seeks to a position in the music.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#setVolume(float)">setVolume</A></B>(float volume)</CODE>
|
|
|
|
<BR>
|
|
Set the volume of the music as a factor of the global volume setting</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Music.html#stop()">stop</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Stop the music playing</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<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.Object</B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<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(java.lang.String)"><!-- --></A><H3>
|
|
Music</H3>
|
|
<PRE>
|
|
public <B>Music</B>(java.lang.String ref)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create and load a piece of music (either OGG or MOD/XM)
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ref</CODE> - The location of the music
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Music(java.net.URL)"><!-- --></A><H3>
|
|
Music</H3>
|
|
<PRE>
|
|
public <B>Music</B>(java.net.URL ref)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create and load a piece of music (either OGG or MOD/XM)
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ref</CODE> - The location of the music
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Music(java.io.InputStream, java.lang.String)"><!-- --></A><H3>
|
|
Music</H3>
|
|
<PRE>
|
|
public <B>Music</B>(java.io.InputStream in,
|
|
java.lang.String ref)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create and load a piece of music (either OGG or MOD/XM)
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>in</CODE> - The stream to read the music from<DD><CODE>ref</CODE> - The symbolic name of this music
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - Indicates a failure to read the music from the stream</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Music(java.net.URL, boolean)"><!-- --></A><H3>
|
|
Music</H3>
|
|
<PRE>
|
|
public <B>Music</B>(java.net.URL url,
|
|
boolean streamingHint)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create and load a piece of music (either OGG or MOD/XM)
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>url</CODE> - The location of the music<DD><CODE>streamingHint</CODE> - A hint to indicate whether streaming should be used if possible
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Music(java.lang.String, boolean)"><!-- --></A><H3>
|
|
Music</H3>
|
|
<PRE>
|
|
public <B>Music</B>(java.lang.String ref,
|
|
boolean streamingHint)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create and load a piece of music (either OGG or MOD/XM)
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ref</CODE> - The location of the music<DD><CODE>streamingHint</CODE> - A hint to indicate whether streaming should be used if possible
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE></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="poll(int)"><!-- --></A><H3>
|
|
poll</H3>
|
|
<PRE>
|
|
public static void <B>poll</B>(int delta)</PRE>
|
|
<DL>
|
|
<DD>Poll the state of the current music. This causes streaming music
|
|
to stream and checks listeners. Note that if you're using a game container
|
|
this will be auto-magically called for you.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>delta</CODE> - The amount of time since last poll</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="addListener(org.newdawn.slick.MusicListener)"><!-- --></A><H3>
|
|
addListener</H3>
|
|
<PRE>
|
|
public void <B>addListener</B>(<A HREF="../../../org/newdawn/slick/MusicListener.html" title="interface in org.newdawn.slick">MusicListener</A> listener)</PRE>
|
|
<DL>
|
|
<DD>Add a listener to this music
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to add</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="removeListener(org.newdawn.slick.MusicListener)"><!-- --></A><H3>
|
|
removeListener</H3>
|
|
<PRE>
|
|
public void <B>removeListener</B>(<A HREF="../../../org/newdawn/slick/MusicListener.html" title="interface in org.newdawn.slick">MusicListener</A> listener)</PRE>
|
|
<DL>
|
|
<DD>Remove a listener from this music
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to remove</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="loop()"><!-- --></A><H3>
|
|
loop</H3>
|
|
<PRE>
|
|
public void <B>loop</B>()</PRE>
|
|
<DL>
|
|
<DD>Loop the music
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="play()"><!-- --></A><H3>
|
|
play</H3>
|
|
<PRE>
|
|
public void <B>play</B>()</PRE>
|
|
<DL>
|
|
<DD>Play the music
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="play(float, float)"><!-- --></A><H3>
|
|
play</H3>
|
|
<PRE>
|
|
public void <B>play</B>(float pitch,
|
|
float volume)</PRE>
|
|
<DL>
|
|
<DD>Play the music at a given pitch and volume
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>pitch</CODE> - The pitch to play the music at (1.0 = default)<DD><CODE>volume</CODE> - The volume to play the music at (1.0 = default)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="loop(float, float)"><!-- --></A><H3>
|
|
loop</H3>
|
|
<PRE>
|
|
public void <B>loop</B>(float pitch,
|
|
float volume)</PRE>
|
|
<DL>
|
|
<DD>Loop the music at a given pitch and volume
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>pitch</CODE> - The pitch to play the music at (1.0 = default)<DD><CODE>volume</CODE> - The volume to play the music at (1.0 = default)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="pause()"><!-- --></A><H3>
|
|
pause</H3>
|
|
<PRE>
|
|
public void <B>pause</B>()</PRE>
|
|
<DL>
|
|
<DD>Pause the music playback
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="stop()"><!-- --></A><H3>
|
|
stop</H3>
|
|
<PRE>
|
|
public void <B>stop</B>()</PRE>
|
|
<DL>
|
|
<DD>Stop the music playing
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="resume()"><!-- --></A><H3>
|
|
resume</H3>
|
|
<PRE>
|
|
public void <B>resume</B>()</PRE>
|
|
<DL>
|
|
<DD>Resume the music playback
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="playing()"><!-- --></A><H3>
|
|
playing</H3>
|
|
<PRE>
|
|
public boolean <B>playing</B>()</PRE>
|
|
<DL>
|
|
<DD>Check if the music is being played
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>True if the music is being played</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setVolume(float)"><!-- --></A><H3>
|
|
setVolume</H3>
|
|
<PRE>
|
|
public void <B>setVolume</B>(float volume)</PRE>
|
|
<DL>
|
|
<DD>Set the volume of the music as a factor of the global volume setting
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>volume</CODE> - The volume to play music at. 0 - 1, 1 is Max</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getVolume()"><!-- --></A><H3>
|
|
getVolume</H3>
|
|
<PRE>
|
|
public float <B>getVolume</B>()</PRE>
|
|
<DL>
|
|
<DD>Get the individual volume of the music
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The volume of this music, still effected by global SoundStore volume. 0 - 1, 1 is Max</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="fade(int, float, boolean)"><!-- --></A><H3>
|
|
fade</H3>
|
|
<PRE>
|
|
public void <B>fade</B>(int duration,
|
|
float endVolume,
|
|
boolean stopAfterFade)</PRE>
|
|
<DL>
|
|
<DD>Fade this music to the volume specified
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - Fade time in milliseconds.<DD><CODE>endVolume</CODE> - The target volume<DD><CODE>stopAfterFade</CODE> - True if music should be stopped after fading in/out</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPosition(float)"><!-- --></A><H3>
|
|
setPosition</H3>
|
|
<PRE>
|
|
public boolean <B>setPosition</B>(float position)</PRE>
|
|
<DL>
|
|
<DD>Seeks to a position in the music. For streaming music, seeking before the current position causes
|
|
the stream to be reloaded.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>position</CODE> - Position in seconds.
|
|
<DT><B>Returns:</B><DD>True if the seek was successful</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPosition()"><!-- --></A><H3>
|
|
getPosition</H3>
|
|
<PRE>
|
|
public float <B>getPosition</B>()</PRE>
|
|
<DL>
|
|
<DD>The position into the sound thats being played
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The current position in seconds.</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> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Music.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../org/newdawn/slick/MouseListener.html" title="interface in org.newdawn.slick"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../org/newdawn/slick/MusicListener.html" title="interface in org.newdawn.slick"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?org/newdawn/slick/Music.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Music.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<i>Copyright © 2006 New Dawn Software. All Rights Reserved.</i>
|
|
</BODY>
|
|
</HTML>
|