Package net.minecraft.client.sounds
Class SoundEngine
java.lang.Object
net.minecraft.client.sounds.SoundEngine
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChannelAccessprivate static final longprivate final AtomicReference<SoundEngine.DeviceCheckState>private final SoundEngineExecutorprivate final com.google.common.collect.Multimap<SoundSource,SoundInstance> private final Map<SoundInstance,ChannelAccess.ChannelHandle> private longprivate 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<ResourceLocation>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 p_120236_, Options p_120237_, ResourceProvider p_249332_) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(SoundEventListener p_120296_) private floatcalculatePitch(SoundInstance p_120325_) private floatcalculateVolume(float p_235258_, SoundSource p_235259_) private floatcalculateVolume(SoundInstance p_120328_) voiddestroy()voidprivate floatgetVolume(SoundSource p_120259_) booleanisActive(SoundInstance p_120306_) private voidvoidpause()voidplay(SoundInstance p_120313_) voidplayDelayed(SoundInstance p_120277_, int p_120278_) voidqueueTickingSound(TickableSoundInstance p_120283_) voidreload()voidremoveEventListener(SoundEventListener p_120308_) voidrequestPreload(Sound p_120273_) private static booleanrequiresManualLooping(SoundInstance p_120316_) voidresume()private booleanprivate static booleanshouldLoopAutomatically(SoundInstance p_120322_) private static booleanshouldLoopManually(SoundInstance p_120319_) voidstop(SoundInstance p_120275_) voidstop(ResourceLocation p_120300_, SoundSource p_120301_) voidstopAll()voidtick(boolean p_120303_) private voidvoidupdateCategoryVolume(SoundSource p_120261_, float p_120262_) voidupdateSource(Camera p_120271_)
-
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
-
DEFAULT_DEVICE_CHECK_INTERVAL_MS
private static final long DEFAULT_DEVICE_CHECK_INTERVAL_MS- See Also:
-
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 -
lastDeviceCheckTime
private long lastDeviceCheckTime -
devicePoolState
-
instanceToChannel
-
instanceBySource
-
tickingSounds
-
queuedSounds
-
soundDeleteTime
-
listeners
-
queuedTickableSounds
-
preloadQueue
-
-
Constructor Details
-
SoundEngine
-
-
Method Details
-
reload
public void reload() -
loadLibrary
private void loadLibrary() -
getVolume
-
updateCategoryVolume
-
destroy
public void destroy() -
emergencyShutdown
public void emergencyShutdown() -
stop
-
stopAll
public void stopAll() -
addEventListener
-
removeEventListener
-
shouldChangeDevice
private boolean shouldChangeDevice() -
tick
public void tick(boolean p_120303_) -
tickNonPaused
private void tickNonPaused() -
requiresManualLooping
-
shouldLoopManually
-
shouldLoopAutomatically
-
isActive
-
play
-
queueTickingSound
-
requestPreload
-
calculatePitch
-
calculateVolume
-
calculateVolume
-
pause
public void pause() -
resume
public void resume() -
playDelayed
-
updateSource
-
stop
-
getDebugString
-
getAvailableSoundDevices
-
getListenerTransform
-