Package net.minecraft.client.sounds
Class SoundEngine
java.lang.Object
net.minecraft.client.sounds.SoundEngine
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ChannelAccess
private static final long
private final AtomicReference
<SoundEngine.DeviceCheckState> private final SoundEngineExecutor
private final com.google.common.collect.Multimap
<SoundSource, SoundInstance> private final Map
<SoundInstance, ChannelAccess.ChannelHandle> private long
private final Library
private final Listener
private final List
<SoundEventListener> private boolean
private static final org.slf4j.Logger
private static final org.slf4j.Marker
private static final int
static final String
private static final Set
<ResourceLocation> static final String
static final int
private final Options
private static final float
private static final float
private final Map
<SoundInstance, Integer> private final List
<TickableSoundInstance> private final SoundBufferLibrary
private final Map
<SoundInstance, Integer> final SoundManager
private int
private final List
<TickableSoundInstance> private static final float
private static final float
-
Constructor Summary
ConstructorDescriptionSoundEngine
(SoundManager p_120236_, Options p_120237_, ResourceProvider p_249332_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventListener
(SoundEventListener p_120296_) private float
calculatePitch
(SoundInstance p_120325_) private float
calculateVolume
(float p_235258_, SoundSource p_235259_) private float
calculateVolume
(SoundInstance p_120328_) void
destroy()
void
private float
getVolume
(SoundSource p_120259_) boolean
isActive
(SoundInstance p_120306_) private void
void
pause()
void
play
(SoundInstance p_120313_) void
playDelayed
(SoundInstance p_120277_, int p_120278_) void
queueTickingSound
(TickableSoundInstance p_120283_) void
reload()
void
removeEventListener
(SoundEventListener p_120308_) void
requestPreload
(Sound p_120273_) private static boolean
requiresManualLooping
(SoundInstance p_120316_) void
resume()
private boolean
private static boolean
shouldLoopAutomatically
(SoundInstance p_120322_) private static boolean
shouldLoopManually
(SoundInstance p_120319_) void
stop
(SoundInstance p_120275_) void
stop
(ResourceLocation p_120300_, SoundSource p_120301_) void
stopAll()
void
tick
(boolean p_120303_) private void
void
updateCategoryVolume
(SoundSource p_120261_, float p_120262_) void
updateSource
(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
-