public class ClipLoader
extends java.lang.Object
Constructor and Description |
---|
ClipLoader(@NotNull AudioFileLoader audioFileLoader,
@Nullable DebugWriter debugSound)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@Nullable javax.sound.sampled.DataLine |
allocateClip(@NotNull java.lang.CharSequence action)
Allocates a new clip.
|
void |
freeClip(@NotNull javax.sound.sampled.Line clip)
Deallocates a clip.
|
public ClipLoader(@NotNull @NotNull AudioFileLoader audioFileLoader, @Nullable @Nullable DebugWriter debugSound)
audioFileLoader
- the audio file loader for loading audio filesdebugSound
- the writer for logging sound related information or
null
to not logpublic void freeClip(@NotNull @NotNull javax.sound.sampled.Line clip)
clip
- the clip to deallocate@Nullable public @Nullable javax.sound.sampled.DataLine allocateClip(@NotNull @NotNull java.lang.CharSequence action)
action
- the action name of the clip to allocatenull
if an error occurs