Class Library

java.lang.Object
com.mojang.blaze3d.audio.Library

public class Library extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NO_DEVICE

      public static final int NO_DEVICE
      See Also:
    • NO_DEVICE_NAME

      private static final String NO_DEVICE_NAME
      See Also:
    • DEFAULT_CHANNEL_COUNT

      private static final int DEFAULT_CHANNEL_COUNT
      See Also:
    • currentDevice

      private long currentDevice
    • currentDeviceName

      private String currentDeviceName
    • context

      private long context
    • supportsDisconnections

      private boolean supportsDisconnections
    • EMPTY

      private static final Library.ChannelPool EMPTY
    • staticChannels

      private Library.ChannelPool staticChannels
    • streamingChannels

      private Library.ChannelPool streamingChannels
    • listener

      private final Listener listener
  • Constructor Details

    • Library

      public Library()
  • Method Details

    • init

      public void init(@Nullable String preferredDevice, DeviceList currentDevices, boolean useHrtf)
    • createAttributes

      private IntBuffer createAttributes(org.lwjgl.system.MemoryStack stack, boolean enableHrtf)
    • getChannelCount

      private int getChannelCount()
    • currentDeviceName

      public @Nullable String currentDeviceName()
    • queryDeviceName

      private static String queryDeviceName(long deviceId)
    • openDeviceOrFallback

      private static long openDeviceOrFallback(@Nullable String preferredDevice, @Nullable String systemDefaultDevice)
    • tryOpenDevice

      private static OptionalLong tryOpenDevice(@Nullable String name)
    • cleanup

      public void cleanup()
    • getListener

      public Listener getListener()
    • acquireChannel

      public @Nullable Channel acquireChannel(Library.Pool pool)
    • releaseChannel

      public void releaseChannel(Channel channel)
    • getChannelDebugString

      public String getChannelDebugString()
    • isCurrentDeviceDisconnected

      public boolean isCurrentDeviceDisconnected()
    • createDeviceTracker

      public static DeviceTracker createDeviceTracker()