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 ChannelManagerchannelAccessprivate SoundEngineExecutorexecutorprivate com.google.common.collect.Multimap<SoundCategory,ISound>instanceBySourceprivate java.util.Map<ISound,ChannelManager.Entry>instanceToChannelprivate SoundSystemlibraryprivate Listenerlistenerprivate java.util.List<ISoundEventListener>listenersprivate booleanloadedprivate static org.apache.logging.log4j.LoggerLOGGERprivate static org.apache.logging.log4j.MarkerMARKERprivate static java.util.Set<ResourceLocation>ONLY_WARN_ONCEprivate GameSettingsoptionsprivate java.util.List<Sound>preloadQueueprivate java.util.Map<ISound,java.lang.Integer>queuedSoundsprivate java.util.List<ITickableSound>queuedTickableSoundsprivate AudioStreamManagersoundBuffersprivate java.util.Map<ISound,java.lang.Integer>soundDeleteTimeSoundHandlersoundManagerprivate inttickCountprivate 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 voidaddEventListener(ISoundEventListener p_188774_1_)private floatcalculatePitch(ISound p_188772_1_)private floatcalculateVolume(ISound p_188770_1_)voiddestroy()java.lang.StringgetDebugString()private floatgetVolume(SoundCategory p_188769_1_)booleanisActive(ISound p_217933_1_)private voidloadLibrary()voidpause()voidplay(ISound p_148611_1_)voidplayDelayed(ISound p_148599_1_, int p_148599_2_)voidqueueTickingSound(ITickableSound p_229363_1_)voidreload()voidremoveEventListener(ISoundEventListener p_188773_1_)voidrequestPreload(Sound p_204259_1_)private static booleanrequiresManualLooping(ISound p_239544_0_)voidresume()private static booleanshouldLoopAutomatically(ISound p_239546_0_)private static booleanshouldLoopManually(ISound p_239545_0_)voidstop(ISound p_148602_1_)voidstop(ResourceLocation p_195855_1_, SoundCategory p_195855_2_)voidstopAll()voidtick(boolean p_217921_1_)private voidtickNonPaused()voidupdateCategoryVolume(SoundCategory p_188771_1_, float p_188771_2_)voidupdateSource(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()
-
-