Class ALC

  • public final class ALC
    extends java.lang.Object
    This class must be used before any OpenAL function is called. It has the following responsibilities:
    • Loads the OpenAL native library into the JVM process.
    • Creates instances of ALCCapabilities classes. An ALCCapabilities instance contains flags for functionality that is available for an OpenAL device. Internally, it also contains function pointers that are only valid for that specific OpenAL device.

    Library lifecycle

    The OpenAL library is loaded automatically when this class is initialized. Set the Configuration.OPENAL_EXPLICIT_INIT option to override this behavior. Manual loading/unloading can be achieved with the create() and destroy() functions. The name of the library loaded can be overridden with the Configuration.OPENAL_LIBRARY_NAME option.

    ALCCapabilities creation

    Instances of ALCCapabilities can be created with the createCapabilities(long) method. Calling this method is expensive, so ALCCapabilities instances should be cached in user code.

    See Also:
    • Method Detail

      • create

        public static void create()
        Loads the OpenAL native library, using the default library name.
      • create

        public static void create​(java.lang.String libName)
        Loads the OpenAL native library, using the specified library name.
        libName - the native library name
      • create

        public static void create​(FunctionProviderLocal functionProvider)
        Initializes ALC with the specified FunctionProviderLocal. This method can be used to implement custom ALC library loading.
        functionProvider - the provider of ALC function addresses
      • destroy

        public static void destroy()
        Unloads the OpenAL native library.
      • createCapabilities

        public static ALCCapabilities createCapabilities​(long device)
        Creates a new ALCCapabilities instance for the specified OpenAL device.
        the ALCCapabilities instance