|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcomponent.AudioPlayer
This class is a wrapper for the Java Media Framework tools that can play AUDIO. It takes filename, and provides methods for loading, playing, stopping, etc.
| Constructor Summary | |
AudioPlayer(java.lang.String filename)
This constructor just sets the filename of the audio. |
|
| Method Summary | |
void |
clear()
This method will stop the media, and clear it from memory. |
javax.media.Time |
getDuration()
This method returns the duration of the preloaded media. |
java.lang.String |
getFilename()
This method returns the filename of media |
double |
getTimeRemaining()
This method returns the time left till it finished in seconds. |
boolean |
isPlaying()
This method checks if the media is still playing. |
boolean |
isReady()
This method checks if the media is loaded and ready to play. |
void |
preload()
This method will preload the media so that it is ready to play. |
void |
setFilename(java.lang.String f)
This method sets the filename of media. |
void |
setRate(float f)
This method sets the rate/speed of the media 1.0 is default. |
void |
setStopTime(javax.media.Time stop)
This method can set the Time at which the media should stop playing. |
void |
start()
This method will start the media. |
void |
stop()
This method will stop the media, but will not clear it from memory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AudioPlayer(java.lang.String filename)
filename - The audio clip| Method Detail |
public boolean isPlaying()
public void start()
public void setRate(float f)
public javax.media.Time getDuration()
public double getTimeRemaining()
public void setStopTime(javax.media.Time stop)
public void stop()
public boolean isReady()
public void clear()
public void preload()
public java.lang.String getFilename()
public void setFilename(java.lang.String f)
|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.