Class SoundEngine
java.lang.Object
net.minecraft.client.sounds.SoundEngine
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChannelAccessprivate final DeviceTrackerprivate final SoundEngineExecutorprivate final it.unimi.dsi.fastutil.objects.Object2FloatMap<SoundSource> private final com.google.common.collect.Multimap<SoundSource, SoundInstance> private final Map<SoundInstance, ChannelAccess.ChannelHandle> private DeviceListprivate final Libraryprivate final Listenerprivate final List<SoundEventListener> private booleanprivate static final org.slf4j.Loggerprivate static final org.slf4j.Markerprivate static final intstatic final Stringprivate static final Set<Identifier> static final Stringstatic final intprivate final Optionsprivate static final floatprivate static final floatprivate final Map<SoundInstance, Integer> private final List<TickableSoundInstance> private final SoundBufferLibraryprivate final Map<SoundInstance, Integer> final SoundManagerprivate intprivate final List<TickableSoundInstance> private static final floatprivate static final float -
Constructor Summary
ConstructorsConstructorDescriptionSoundEngine(SoundManager soundManager, Options options, ResourceProvider resourceProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(SoundEventListener listener) private floatcalculatePitch(SoundInstance instance) private floatcalculateVolume(float volume, SoundSource source) private floatcalculateVolume(SoundInstance instance) voiddestroy()voidvoidbooleanisActive(SoundInstance instance) private voidvoidpauseAllExcept(SoundSource... ignoredSources) play(SoundInstance instance) voidplayDelayed(SoundInstance instance, int delay) voidqueueTickingSound(TickableSoundInstance tickableSoundInstance) voidrefreshCategoryVolume(SoundSource source) voidreload()voidremoveEventListener(SoundEventListener listener) voidrequestPreload(Sound sound) private static booleanrequiresManualLooping(SoundInstance instance) voidresume()private booleanprivate static booleanshouldLoopAutomatically(SoundInstance instance) private static booleanshouldLoopManually(SoundInstance instance) voidstop(SoundInstance soundInstance) voidstop(@Nullable Identifier sound, @Nullable SoundSource source) voidstopAll()voidtick(boolean paused) private voidprivate voidvoidupdateCategoryVolume(SoundSource source, float gain) voidupdateSource(Camera camera)
-
Field Details
-
MARKER
private static final org.slf4j.Marker MARKER -
LOGGER
private static final org.slf4j.Logger LOGGER -
PITCH_MIN
private static final float PITCH_MIN- See Also:
-
PITCH_MAX
private static final float PITCH_MAX- See Also:
-
VOLUME_MIN
private static final float VOLUME_MIN- See Also:
-
VOLUME_MAX
private static final float VOLUME_MAX- See Also:
-
MIN_SOURCE_LIFETIME
private static final int MIN_SOURCE_LIFETIME- See Also:
-
ONLY_WARN_ONCE
-
MISSING_SOUND
- See Also:
-
OPEN_AL_SOFT_PREFIX
- See Also:
-
OPEN_AL_SOFT_PREFIX_LENGTH
public static final int OPEN_AL_SOFT_PREFIX_LENGTH -
soundManager
-
options
-
loaded
private boolean loaded -
library
-
listener
-
soundBuffers
-
executor
-
channelAccess
-
tickCount
private int tickCount -
lastSeenDevices
-
deviceTracker
-
instanceToChannel
-
instanceBySource
-
gainBySource
-
tickingSounds
-
queuedSounds
-
soundDeleteTime
-
listeners
-
queuedTickableSounds
-
preloadQueue
-
-
Constructor Details
-
SoundEngine
-
-
Method Details
-
reload
public void reload() -
loadLibrary
private void loadLibrary() -
refreshCategoryVolume
-
destroy
public void destroy() -
emergencyShutdown
public void emergencyShutdown() -
stop
-
updateCategoryVolume
-
stopAll
public void stopAll() -
addEventListener
-
removeEventListener
-
shouldChangeDevice
private boolean shouldChangeDevice() -
tick
public void tick(boolean paused) -
tickInGameSound
private void tickInGameSound() -
tickMusicWhenPaused
private void tickMusicWhenPaused() -
requiresManualLooping
-
shouldLoopManually
-
shouldLoopAutomatically
-
isActive
-
play
-
queueTickingSound
-
requestPreload
-
calculatePitch
-
calculateVolume
-
calculateVolume
-
pauseAllExcept
-
resume
public void resume() -
playDelayed
-
updateSource
-
stop
-
getChannelDebugString
-
getSoundCacheDebugStats
-
getAvailableSoundDevices
-
getListenerTransform
-