|
Crossfire JXClient, Trunk
R20561
|
Manages all sounds. More...
Collaboration diagram for com.realtime.crossfire.jxclient.sound.SoundManager:Public Member Functions | |
| void | playClip (@NotNull final Sounds type, @Nullable final String name, @NotNull final String action) |
| Plays a sound clip. More... | |
| void | playMusic (@Nullable final String name) |
| Plays a background music. More... | |
| void | setEnabled (final boolean enabled) |
| Sets whether the sound system is enabled. More... | |
| void | shutdown () |
| Terminates all sounds and free resources. More... | |
| SoundManager (@NotNull final GuiStateManager guiStateManager, @Nullable final DebugWriter debugSound) | |
| Creates a new instance. More... | |
Private Member Functions | |
| void | mute (@NotNull final Sounds type, final boolean mute) |
| Mutes or unmutes sound effects. More... | |
| void | muteMusic (final boolean muted) |
| Mutes or unmutes background music. More... | |
Private Attributes | |
| final ClipManager | clipManager |
| The clip manager for playing sound effects. More... | |
| final DebugWriter | debugSound |
| The writer for logging sound related information or. More... | |
| boolean | enabled |
| Whether sound is enabled. More... | |
| final GuiStateListener | guiStateListener |
| The GuiStateListener for detecting established or dropped connections. More... | |
| final MusicManager | musicManager |
| The music manager for playing background music. More... | |
| final Collection< Sounds > | mutedSounds = EnumSet.allOf(Sounds.class) |
| The muted sounds. More... | |
Manages all sounds.
Each sound has a sound type (Sounds) attached. Sound types can be disabled (by the user) or muted (by the application). A sound is played only if it is neither disabled nor muted.
Definition at line 39 of file SoundManager.java.
| com.realtime.crossfire.jxclient.sound.SoundManager.SoundManager | ( | @NotNull final GuiStateManager | guiStateManager, |
| @Nullable final DebugWriter | debugSound | ||
| ) |
Creates a new instance.
| guiStateManager | the gui state manager to watch |
| debugSound | the writer for logging sound related information or null |
Definition at line 126 of file SoundManager.java.
References com.realtime.crossfire.jxclient.sound.SoundManager.debugSound, and com.realtime.crossfire.jxclient.sound.SoundManager.guiStateListener.
|
private |
Mutes or unmutes sound effects.
| type | the sound type to affect |
| mute | whether to mute ( true false |
Definition at line 179 of file SoundManager.java.
|
private |
Mutes or unmutes background music.
| muted | whether to mute ( true false |
Definition at line 201 of file SoundManager.java.
References com.realtime.crossfire.jxclient.sound.MusicManager.setMuted().
Here is the call graph for this function:| void com.realtime.crossfire.jxclient.sound.SoundManager.playClip | ( | @NotNull final Sounds | type, |
| @Nullable final String | name, | ||
| @NotNull final String | action | ||
| ) |
Plays a sound clip.
| type | the sound type |
| name | an optional prefix for the action name |
| action | the sound action name |
Definition at line 153 of file SoundManager.java.
References com.realtime.crossfire.jxclient.util.DebugWriter.debugProtocolWrite(), and com.realtime.crossfire.jxclient.sound.ClipManager.play().
Referenced by com.realtime.crossfire.jxclient.sound.StatsWatcher.playClip().
Here is the call graph for this function:
Here is the caller graph for this function:| void com.realtime.crossfire.jxclient.sound.SoundManager.playMusic | ( | @Nullable final String | name | ) |
Plays a background music.
If the new music name is unchanged, continue playing.
| name | the music name |
Definition at line 193 of file SoundManager.java.
References com.realtime.crossfire.jxclient.sound.MusicManager.play().
Here is the call graph for this function:| void com.realtime.crossfire.jxclient.sound.SoundManager.setEnabled | ( | final boolean | enabled | ) |
Sets whether the sound system is enabled.
| enabled | whether the sound system is enabled |
Definition at line 138 of file SoundManager.java.
References com.realtime.crossfire.jxclient.sound.SoundManager.enabled, and com.realtime.crossfire.jxclient.sound.MusicManager.setEnabled().
Referenced by com.realtime.crossfire.jxclient.sound.SoundCheckBoxOption.execute().
Here is the call graph for this function:
Here is the caller graph for this function:| void com.realtime.crossfire.jxclient.sound.SoundManager.shutdown | ( | ) |
Terminates all sounds and free resources.
Definition at line 208 of file SoundManager.java.
References com.realtime.crossfire.jxclient.util.DebugWriter.debugProtocolWrite(), com.realtime.crossfire.jxclient.sound.ClipManager.shutdown(), and com.realtime.crossfire.jxclient.sound.MusicManager.shutdown().
Here is the call graph for this function:
|
private |
The clip manager for playing sound effects.
Definition at line 45 of file SoundManager.java.
|
private |
The writer for logging sound related information or.
to not log.
Definition at line 52 of file SoundManager.java.
Referenced by com.realtime.crossfire.jxclient.sound.SoundManager.SoundManager().
|
private |
Whether sound is enabled.
Definition at line 63 of file SoundManager.java.
Referenced by com.realtime.crossfire.jxclient.sound.SoundManager.setEnabled().
|
private |
The GuiStateListener for detecting established or dropped connections.
Definition at line 77 of file SoundManager.java.
Referenced by com.realtime.crossfire.jxclient.sound.SoundManager.SoundManager().
|
private |
The music manager for playing background music.
Definition at line 58 of file SoundManager.java.
|
private |
The muted sounds.
Definition at line 69 of file SoundManager.java.