public class ClipManager
extends java.lang.Object
Constructor and Description |
---|
ClipManager(@NotNull AudioFileLoader audioFileLoader,
@Nullable DebugWriter debugSound,
@NotNull SoundTaskExecutor soundTaskExecutor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
play(@NotNull java.lang.CharSequence action)
Plays the given sound effect.
|
void |
shutdown()
Terminates all running clips and free resources.
|
public ClipManager(@NotNull @NotNull AudioFileLoader audioFileLoader, @Nullable @Nullable DebugWriter debugSound, @NotNull @NotNull SoundTaskExecutor soundTaskExecutor)
audioFileLoader
- the audio file loader for loading audio filesdebugSound
- the writer for logging sound related information or
null
to not logsoundTaskExecutor
- the global sound task executorpublic void play(@NotNull @NotNull java.lang.CharSequence action)
action
- the action name of the sound effectpublic void shutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the current thread was interrupted while
waiting for the shutdown