Class Player
Object
Player
public class Player
- extends Object
Handle to sound being played.
Player can be instantiated using getPlayer()-functions.
See Sound Player-example.
- See Also:
getPlayer(String, int),
getPlayer(ByteArray, String, int),
playSound(String,int)
|
Method Summary |
void |
close()
Closes Player instance and releases resources. |
void |
reset()
Resets Player's sound position to to the beginning, this should be done if
you wish to start playing the sound again from the beginning. |
void |
setLoopCount(int count)
Set the number of times the Player will loop and play the content. |
void |
start()
Starts playing sound from it's current location. |
void |
stop()
Stops playing of current sound. |
| Methods inherited from |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
start
public void start()
- Starts playing sound from it's current location. If this is first
time the sound is being played location is the beginning.
stop
public void stop()
- Stops playing of current sound. Please remember also to
close()
Player after you don't need it anymore.
reset
public void reset()
- Resets Player's sound position to to the beginning, this should be done if
you wish to start playing the sound again from the beginning.
setLoopCount
public void setLoopCount(int count)
- Set the number of times the Player will loop and play the content.
- Parameters:
count - indicates the number of times the content will be played. 1 is the default. 0 is invalid. -1 indicates looping indefintely.
close
public void close()
- Closes Player instance and releases resources. Please remember to set your
player instance to null so that it can be garbace collected.