Class AudioNatives


  • public final class AudioNatives
    extends java.lang.Object
    Controller used by JDA to ensure the native binaries for opus en-/decoding are available.
    See Also:
    opus-java source
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean ensureOpus()
      Checks whether the opus binary was loaded, if not it will be initialized here.
      static boolean isAudioSupported()
      Whether the opus library is loaded or not.
      static boolean isInitialized()
      Whether this class was already initialized or not.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isAudioSupported

        public static boolean isAudioSupported()
        Whether the opus library is loaded or not.
        This is initialized by the first call to ensureOpus().
        Returns:
        True, opus library is loaded.
      • isInitialized

        public static boolean isInitialized()
        Whether this class was already initialized or not.
        Returns:
        True, if this class was already initialized.
        See Also:
        ensureOpus()
      • ensureOpus

        public static boolean ensureOpus()
        Checks whether the opus binary was loaded, if not it will be initialized here.
        This is used by JDA to check at runtime whether the opus library is available or not.
        Returns:
        True, if the library could be loaded.