uwcse.io
Class AudioPlayer
java.lang.Object
|
+--uwcse.io.AudioPlayer
- public class AudioPlayer
- extends java.lang.Object
A simple Audio player. Plays instances of the Sound class.
Constructor Summary |
AudioPlayer()
Create an audio player. |
Method Summary |
void |
loop(Sound s)
Start playing the given sound, and repeat playing it until told
to stop. |
static void |
main(java.lang.String[] args)
Test the audio player. |
void |
play(Sound s)
Start playing the given sound, and play it once, or until told
to stop. |
void |
stop(Sound s)
Stop playing the given sound. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AudioPlayer
public AudioPlayer()
- Create an audio player.
loop
public void loop(Sound s)
- Start playing the given sound, and repeat playing it until told
to stop.
main
public static void main(java.lang.String[] args)
- Test the audio player.
play
public void play(Sound s)
- Start playing the given sound, and play it once, or until told
to stop.
stop
public void stop(Sound s)
- Stop playing the given sound.