Crossfire JXClient, Trunk
R20561
|
Manages a set of sound clips (short sound effects). More...
Public Member Functions | |
ClipManager (@NotNull final AudioFileLoader audioFileLoader, @Nullable final DebugWriter debugSound) | |
Creates a new instance. More... | |
void | play (@Nullable final String name, @NotNull final String action) |
Plays the given sound effect. More... | |
void | shutdown () |
Terminates all running clips and free resources. More... | |
Private Attributes | |
final ClipCache | clipCache |
The clip cache used to allocate new clips. More... | |
final ExecutorService | executorService = Executors.newCachedThreadPool() |
The executor service used to play sound clips. More... | |
Manages a set of sound clips (short sound effects).
Multiple sound effects can be played simultaneously.
Definition at line 36 of file ClipManager.java.
com.realtime.crossfire.jxclient.sound.ClipManager.ClipManager | ( | @NotNull final AudioFileLoader | audioFileLoader, |
@Nullable final DebugWriter | debugSound | ||
) |
Creates a new instance.
audioFileLoader | the audio file loader for loading audio files |
debugSound | the writer for logging sound related information or null |
Definition at line 56 of file ClipManager.java.
void com.realtime.crossfire.jxclient.sound.ClipManager.play | ( | @Nullable final String | name, |
@NotNull final String | action | ||
) |
Plays the given sound effect.
This function returns immediately.
name | an optional prefix for the action name |
action | the action name of the sound effect |
Definition at line 65 of file ClipManager.java.
References com.realtime.crossfire.jxclient.sound.ClipCache.allocateClip(), and com.realtime.crossfire.jxclient.sound.ClipCache.freeClip().
Referenced by com.realtime.crossfire.jxclient.sound.SoundManager.playClip().
void com.realtime.crossfire.jxclient.sound.ClipManager.shutdown | ( | ) |
Terminates all running clips and free resources.
Definition at line 88 of file ClipManager.java.
Referenced by com.realtime.crossfire.jxclient.sound.SoundManager.shutdown().
|
private |
The clip cache used to allocate new clips.
Definition at line 48 of file ClipManager.java.
|
private |
The executor service used to play sound clips.
Definition at line 42 of file ClipManager.java.