|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbluegammon.Audio
Audio manager. Contains one player for each sound.
Implementation note: the format of the sound is hardcoded
in method playSound
.
Field Summary | |
static int |
CONN_FAIL
Connection failed sound |
static int |
DICES_LONG
Dices hitting board, long sound |
static int |
DICES_SHORT
Dices hitting board, short sound |
static int |
LOSER
Loser sound |
static int |
MESSAGE
Message sound |
static int |
MUSIC
Jazzy background music |
static int |
PIECE
Piece sound |
static int |
WINNER
Winner sound |
Method Summary | |
static void |
playSound(int snd)
Starts playing specified sound, one of Audio.MUSIC ,
Audio.DICES_LONG , Audio.DICES_SHORT ,
Audio.PIECE . |
static void |
shutdown()
Stops all sounds and cleans up resources. |
static void |
stopSound(int snd)
Stops specified sound if it is playing. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MUSIC
public static final int DICES_LONG
public static final int DICES_SHORT
public static final int PIECE
public static final int MESSAGE
public static final int CONN_FAIL
public static final int WINNER
public static final int LOSER
Method Detail |
public static void playSound(int snd)
Audio.MUSIC
,
Audio.DICES_LONG
, Audio.DICES_SHORT
,
Audio.PIECE
. If there is another sound playing,
it is stopped.
snd
- The id of the sound to play.public static void stopSound(int snd)
snd
- The id of the sound to stop.public static void shutdown()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |