|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.huguesjohnson.tiamat.audio.AudioPlayer
public abstract class AudioPlayer
AudioPlayer - abstract class for playing audio
Field Summary | |
---|---|
static int |
INFINITE_LOOP
|
protected int |
loop
The number of times to loop. |
protected int |
trackIndex
The index of the track currently being played. |
protected java.lang.String[] |
trackList
The list of tracks to play. |
Constructor Summary | |
---|---|
AudioPlayer()
|
Method Summary | |
---|---|
abstract void |
play(java.lang.String path)
Play with no loop. |
abstract void |
play(java.lang.String[] paths)
Play with no loop. |
abstract void |
play(java.lang.String[] paths,
int loop)
Play with looping, loops back to the first track after playing the last one. |
abstract void |
play(java.lang.String path,
int loop)
Play with looping. |
abstract void |
stop()
Stops playback. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int loop
protected java.lang.String[] trackList
protected int trackIndex
public static final int INFINITE_LOOP
Constructor Detail |
---|
public AudioPlayer()
Method Detail |
---|
public abstract void play(java.lang.String path)
path
- The path of the audio file to play.public abstract void play(java.lang.String path, int loop)
path
- The path of the audio file to play.loop
- The number of times to loop, if loop <0 the infinite loop.public abstract void play(java.lang.String[] paths)
paths
- The paths of the audio files to play.public abstract void play(java.lang.String[] paths, int loop)
paths
- The paths of the audio files to play.loop
- The number of times to loop, if loop <0 the infinite loop.public abstract void stop()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |