Package org.lwjgl.stb

Class STBVorbisInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer


    public class STBVorbisInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Information about a Vorbis stream.

    Layout

    struct stb_vorbis_info {
        unsigned int sample_rate;
        int channels;
        unsigned int setup_memory_required;
        unsigned int setup_temp_memory_required;
        unsigned int temp_memory_required;
        int max_frame_size;
    }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • STBVorbisInfo

        public STBVorbisInfo(java.nio.ByteBuffer container)
        Creates a STBVorbisInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: org.lwjgl.system.Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • sample_rate

        public int sample_rate()
        Returns the value of the sample_rate field.
      • channels

        public int channels()
        Returns the value of the channels field.
      • setup_memory_required

        public int setup_memory_required()
        Returns the value of the setup_memory_required field.
      • setup_temp_memory_required

        public int setup_temp_memory_required()
        Returns the value of the setup_temp_memory_required field.
      • temp_memory_required

        public int temp_memory_required()
        Returns the value of the temp_memory_required field.
      • max_frame_size

        public int max_frame_size()
        Returns the value of the max_frame_size field.
      • malloc

        public static STBVorbisInfo malloc()
        Returns a new STBVorbisInfo instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static STBVorbisInfo calloc()
        Returns a new STBVorbisInfo instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static STBVorbisInfo create(long address)
        Returns a new STBVorbisInfo instance for the specified memory address or null if the address is NULL.
      • malloc

        public static STBVorbisInfo.Buffer malloc(int capacity)
        Returns a new STBVorbisInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static STBVorbisInfo.Buffer calloc(int capacity)
        Returns a new STBVorbisInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static STBVorbisInfo.Buffer create(long address,
                                                  int capacity)
        Create a STBVorbisInfo.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • mallocStack

        public static STBVorbisInfo mallocStack()
        Returns a new STBVorbisInfo instance allocated on the thread-local MemoryStack.
      • callocStack

        public static STBVorbisInfo callocStack()
        Returns a new STBVorbisInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static STBVorbisInfo mallocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new STBVorbisInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static STBVorbisInfo callocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new STBVorbisInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • mallocStack

        public static STBVorbisInfo.Buffer mallocStack(int capacity)
        Returns a new STBVorbisInfo.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static STBVorbisInfo.Buffer callocStack(int capacity)
        Returns a new STBVorbisInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static STBVorbisInfo.Buffer mallocStack(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new STBVorbisInfo.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static STBVorbisInfo.Buffer callocStack(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new STBVorbisInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity