Package net.minecraft.client.audio
Class SoundEngine
- java.lang.Object
-
- net.minecraft.client.audio.SoundEngine
-
public class SoundEngine extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelManager
channelAccess
private SoundEngineExecutor
executor
private com.google.common.collect.Multimap<SoundCategory,ISound>
instanceBySource
private java.util.Map<ISound,ChannelManager.Entry>
instanceToChannel
private SoundSystem
library
private Listener
listener
private java.util.List<ISoundEventListener>
listeners
private boolean
loaded
private static org.apache.logging.log4j.Logger
LOGGER
private static org.apache.logging.log4j.Marker
MARKER
private static java.util.Set<ResourceLocation>
ONLY_WARN_ONCE
private GameSettings
options
private java.util.List<Sound>
preloadQueue
private java.util.Map<ISound,java.lang.Integer>
queuedSounds
private java.util.List<ITickableSound>
queuedTickableSounds
private AudioStreamManager
soundBuffers
private java.util.Map<ISound,java.lang.Integer>
soundDeleteTime
SoundHandler
soundManager
private int
tickCount
private java.util.List<ITickableSound>
tickingSounds
-
Constructor Summary
Constructors Constructor Description SoundEngine(SoundHandler p_i50892_1_, GameSettings p_i50892_2_, IResourceManager p_i50892_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEventListener(ISoundEventListener p_188774_1_)
private float
calculatePitch(ISound p_188772_1_)
private float
calculateVolume(ISound p_188770_1_)
void
destroy()
java.lang.String
getDebugString()
private float
getVolume(SoundCategory p_188769_1_)
boolean
isActive(ISound p_217933_1_)
private void
loadLibrary()
void
pause()
void
play(ISound p_148611_1_)
void
playDelayed(ISound p_148599_1_, int p_148599_2_)
void
queueTickingSound(ITickableSound p_229363_1_)
void
reload()
void
removeEventListener(ISoundEventListener p_188773_1_)
void
requestPreload(Sound p_204259_1_)
private static boolean
requiresManualLooping(ISound p_239544_0_)
void
resume()
private static boolean
shouldLoopAutomatically(ISound p_239546_0_)
private static boolean
shouldLoopManually(ISound p_239545_0_)
void
stop(ISound p_148602_1_)
void
stop(ResourceLocation p_195855_1_, SoundCategory p_195855_2_)
void
stopAll()
void
tick(boolean p_217921_1_)
private void
tickNonPaused()
void
updateCategoryVolume(SoundCategory p_188771_1_, float p_188771_2_)
void
updateSource(ActiveRenderInfo p_217920_1_)
-
-
-
Field Detail
-
MARKER
private static final org.apache.logging.log4j.Marker MARKER
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
ONLY_WARN_ONCE
private static final java.util.Set<ResourceLocation> ONLY_WARN_ONCE
-
soundManager
public final SoundHandler soundManager
-
options
private final GameSettings options
-
loaded
private boolean loaded
-
library
private final SoundSystem library
-
listener
private final Listener listener
-
soundBuffers
private final AudioStreamManager soundBuffers
-
executor
private final SoundEngineExecutor executor
-
channelAccess
private final ChannelManager channelAccess
-
tickCount
private int tickCount
-
instanceToChannel
private final java.util.Map<ISound,ChannelManager.Entry> instanceToChannel
-
instanceBySource
private final com.google.common.collect.Multimap<SoundCategory,ISound> instanceBySource
-
tickingSounds
private final java.util.List<ITickableSound> tickingSounds
-
queuedSounds
private final java.util.Map<ISound,java.lang.Integer> queuedSounds
-
soundDeleteTime
private final java.util.Map<ISound,java.lang.Integer> soundDeleteTime
-
listeners
private final java.util.List<ISoundEventListener> listeners
-
queuedTickableSounds
private final java.util.List<ITickableSound> queuedTickableSounds
-
preloadQueue
private final java.util.List<Sound> preloadQueue
-
-
Constructor Detail
-
SoundEngine
public SoundEngine(SoundHandler p_i50892_1_, GameSettings p_i50892_2_, IResourceManager p_i50892_3_)
-
-
Method Detail
-
reload
public void reload()
-
loadLibrary
private void loadLibrary()
-
getVolume
private float getVolume(@Nullable SoundCategory p_188769_1_)
-
updateCategoryVolume
public void updateCategoryVolume(SoundCategory p_188771_1_, float p_188771_2_)
-
destroy
public void destroy()
-
stop
public void stop(ISound p_148602_1_)
-
stopAll
public void stopAll()
-
addEventListener
public void addEventListener(ISoundEventListener p_188774_1_)
-
removeEventListener
public void removeEventListener(ISoundEventListener p_188773_1_)
-
tick
public void tick(boolean p_217921_1_)
-
tickNonPaused
private void tickNonPaused()
-
requiresManualLooping
private static boolean requiresManualLooping(ISound p_239544_0_)
-
shouldLoopManually
private static boolean shouldLoopManually(ISound p_239545_0_)
-
shouldLoopAutomatically
private static boolean shouldLoopAutomatically(ISound p_239546_0_)
-
isActive
public boolean isActive(ISound p_217933_1_)
-
play
public void play(ISound p_148611_1_)
-
queueTickingSound
public void queueTickingSound(ITickableSound p_229363_1_)
-
requestPreload
public void requestPreload(Sound p_204259_1_)
-
calculatePitch
private float calculatePitch(ISound p_188772_1_)
-
calculateVolume
private float calculateVolume(ISound p_188770_1_)
-
pause
public void pause()
-
resume
public void resume()
-
playDelayed
public void playDelayed(ISound p_148599_1_, int p_148599_2_)
-
updateSource
public void updateSource(ActiveRenderInfo p_217920_1_)
-
stop
public void stop(@Nullable ResourceLocation p_195855_1_, @Nullable SoundCategory p_195855_2_)
-
getDebugString
public java.lang.String getDebugString()
-
-