 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.sound;
26 import java.util.Objects;
27 import org.jetbrains.annotations.NotNull;
28 import org.jetbrains.annotations.Nullable;
97 public void play(@Nullable
final CharSequence
name) {
98 if (Objects.equals(
this.name,
name)) {
130 if (this.muted ==
muted) {
169 }
catch (
final InterruptedException ex) {
170 throw new AssertionError(ex);
void shutdown()
Terminates a playing background music and free resources.
boolean muted
Whether background music is muted.
MusicManager(@NotNull final AudioFileLoader audioFileLoader, @Nullable final DebugWriter debugSound)
Creates a new instance.
void setMuted(final boolean muted)
Sets whether background music is muted.
void terminate(final boolean fadeOut)
Stops playing music.
final DebugWriter debugSound
The writer for logging sound related information or.
A thread that plays a music file over and over until terminated.
void debugProtocolWrite(@NotNull final CharSequence str)
Writes a message to the debug protocol.
Thread thread
The Thread executing processor.
void restart()
Restarts the current music.
void play(@Nullable final CharSequence name)
Plays the given music.
CharSequence name
The currently playing music name.
Processor processor
The currently running processor, or.
void setEnabled(final boolean enabled)
Sets whether background music is enabled.
boolean enabled
Whether background music is enabled.
final AudioFileLoader audioFileLoader
The AudioFileLoader for loading audio files.
Writer debug information to a log file.