public class SoundEngine
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private AudioStreamManager |
audioStreamManager |
private ChannelManager |
channelManager |
private java.util.Map<ISound,java.lang.Integer> |
delayedSounds |
private SoundEngineExecutor |
executor |
private com.google.common.collect.Multimap<SoundCategory,ISound> |
field_217943_n |
private java.util.List<ITickableSound> |
field_229361_s_ |
private Listener |
listener |
private java.util.List<ISoundEventListener> |
listeners |
private boolean |
loaded |
private static org.apache.logging.log4j.Marker |
LOG_MARKER |
private static org.apache.logging.log4j.Logger |
LOGGER |
private GameSettings |
options |
private java.util.Map<ISound,ChannelManager.Entry> |
playingSoundsChannel |
private java.util.Map<ISound,java.lang.Integer> |
playingSoundsStopTime |
SoundHandler |
sndHandler |
private SoundSystem |
sndSystem |
private java.util.List<Sound> |
soundsToPreload |
private java.util.List<ITickableSound> |
tickableSounds |
private int |
ticks |
private static java.util.Set<ResourceLocation> |
UNABLE_TO_PLAY |
Constructor and Description |
---|
SoundEngine(SoundHandler sndHandlerIn,
GameSettings optionsIn,
IResourceManager resourceManagerIn) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ISoundEventListener listener) |
void |
enqueuePreload(Sound soundIn) |
void |
func_229363_a_(ITickableSound p_229363_1_) |
private float |
getClampedPitch(ISound soundIn) |
private float |
getClampedVolume(ISound soundIn) |
java.lang.String |
getDebugString() |
private float |
getVolume(SoundCategory category) |
boolean |
isPlaying(ISound soundIn) |
private void |
load() |
void |
pause() |
void |
play(ISound p_sound) |
void |
playDelayed(ISound sound,
int delay) |
void |
reload() |
void |
removeListener(ISoundEventListener listener) |
void |
resume() |
void |
setVolume(SoundCategory category,
float volume) |
void |
stop(ISound sound) |
void |
stop(ResourceLocation soundName,
SoundCategory category) |
void |
stopAllSounds() |
void |
tick(boolean isGamePaused) |
private void |
tickNonPaused() |
void |
unload() |
void |
updateListener(ActiveRenderInfo p_217920_1_) |
private static final org.apache.logging.log4j.Marker LOG_MARKER
private static final org.apache.logging.log4j.Logger LOGGER
private static final java.util.Set<ResourceLocation> UNABLE_TO_PLAY
public final SoundHandler sndHandler
private final GameSettings options
private boolean loaded
private final SoundSystem sndSystem
private final Listener listener
private final AudioStreamManager audioStreamManager
private final SoundEngineExecutor executor
private final ChannelManager channelManager
private int ticks
private final java.util.Map<ISound,ChannelManager.Entry> playingSoundsChannel
private final com.google.common.collect.Multimap<SoundCategory,ISound> field_217943_n
private final java.util.List<ITickableSound> tickableSounds
private final java.util.Map<ISound,java.lang.Integer> delayedSounds
private final java.util.Map<ISound,java.lang.Integer> playingSoundsStopTime
private final java.util.List<ISoundEventListener> listeners
private final java.util.List<ITickableSound> field_229361_s_
private final java.util.List<Sound> soundsToPreload
public SoundEngine(SoundHandler sndHandlerIn, GameSettings optionsIn, IResourceManager resourceManagerIn)
public void reload()
private void load()
private float getVolume(SoundCategory category)
public void setVolume(SoundCategory category, float volume)
public void unload()
public void stop(ISound sound)
public void stopAllSounds()
public void addListener(ISoundEventListener listener)
public void removeListener(ISoundEventListener listener)
public void tick(boolean isGamePaused)
private void tickNonPaused()
public boolean isPlaying(ISound soundIn)
public void play(ISound p_sound)
public void func_229363_a_(ITickableSound p_229363_1_)
public void enqueuePreload(Sound soundIn)
private float getClampedPitch(ISound soundIn)
private float getClampedVolume(ISound soundIn)
public void pause()
public void resume()
public void playDelayed(ISound sound, int delay)
public void updateListener(ActiveRenderInfo p_217920_1_)
public void stop(@Nullable ResourceLocation soundName, @Nullable SoundCategory category)
public java.lang.String getDebugString()