|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object group1.view.audio.AudioFacade
public class AudioFacade
A facade class for the audio system. Takes care of channel creation, data caching, and audio playback. (Also, this class is carefully written so that, no matter what goes wrong, nothing breaks. The worst that can happen in such a case is that any unavailable audio doesn't play, or we wait a tiny bit.)
Constructor Summary | |
---|---|
AudioFacade()
Constructor. |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Main for testing. |
void |
pauseAll()
Pause all audio channels. |
void |
pauseChannel(AudioChannel channel)
Pause the specified audio channel. |
AudioChannel |
playAudio(Audio a)
Play an audio file. |
AudioChannel |
playMusic(Audio a)
Play music. |
AudioChannel |
playSound(Audio a)
Play a sound effect. |
void |
stopAllAudio()
Stop all audio channels' audio. |
void |
stopAllThreads()
Stop all audio channels' threads, and remove all channels from this class. |
void |
stopChannelAudio(AudioChannel channel)
Stop the specified audio channel's audio. |
void |
stopChannelThread(AudioChannel channel)
Pause the specified audio channel's thread, and remove that thread from this class. |
void |
unpauseAll()
Unpause all audio channels. |
void |
unpauseChannel(AudioChannel channel)
Unpause the specified audio channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AudioFacade()
Method Detail |
---|
public static void main(java.lang.String[] args)
public AudioChannel playMusic(Audio a)
a
- The Audio enum type representing the music to be played.
public AudioChannel playSound(Audio a)
a
- The Audio enum type representing the sound to be played.
public AudioChannel playAudio(Audio a)
a
- The Audio enum type representing the audio to be played.
public void pauseAll()
public void pauseChannel(AudioChannel channel)
channel
- The audio channel.public void unpauseAll()
public void unpauseChannel(AudioChannel channel)
channel
- The audio channel.public void stopAllAudio()
public void stopChannelAudio(AudioChannel channel)
channel
- The audio channel.public void stopAllThreads()
public void stopChannelThread(AudioChannel channel)
channel
- The audio channel.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |