Package org.lwjgl.stb

Class STBVorbisInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class STBVorbisInfo extends Struct<STBVorbisInfo> implements NativeResource

 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 Details

    • SIZEOF

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

      public static final int ALIGNOF
      The struct alignment in bytes.
    • SAMPLE_RATE

      public static final int SAMPLE_RATE
      The struct member offsets.
    • CHANNELS

      public static final int CHANNELS
      The struct member offsets.
    • SETUP_MEMORY_REQUIRED

      public static final int SETUP_MEMORY_REQUIRED
      The struct member offsets.
    • SETUP_TEMP_MEMORY_REQUIRED

      public static final int SETUP_TEMP_MEMORY_REQUIRED
      The struct member offsets.
    • TEMP_MEMORY_REQUIRED

      public static final int TEMP_MEMORY_REQUIRED
      The struct member offsets.
    • MAX_FRAME_SIZE

      public static final int MAX_FRAME_SIZE
      The struct member offsets.
  • Constructor Details

    • STBVorbisInfo

      public STBVorbisInfo(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<STBVorbisInfo>
    • 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()
      Returns a new STBVorbisInfo instance allocated with BufferUtils.
    • create

      public static STBVorbisInfo create(long address)
      Returns a new STBVorbisInfo instance for the specified memory address.
    • createSafe

      public static @Nullable STBVorbisInfo createSafe(long address)
      Like create, but returns null if 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(int capacity)
      Returns a new STBVorbisInfo.Buffer instance allocated with BufferUtils.
      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
    • createSafe

      public static @Nullable STBVorbisInfo.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static STBVorbisInfo malloc(MemoryStack stack)
      Returns a new STBVorbisInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static STBVorbisInfo calloc(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
    • malloc

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

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

      public static int nsample_rate(long struct)
      Unsafe version of sample_rate().
    • nchannels

      public static int nchannels(long struct)
      Unsafe version of channels().
    • nsetup_memory_required

      public static int nsetup_memory_required(long struct)
      Unsafe version of setup_memory_required().
    • nsetup_temp_memory_required

      public static int nsetup_temp_memory_required(long struct)
      Unsafe version of setup_temp_memory_required().
    • ntemp_memory_required

      public static int ntemp_memory_required(long struct)
      Unsafe version of temp_memory_required().
    • nmax_frame_size

      public static int nmax_frame_size(long struct)
      Unsafe version of max_frame_size().