Package org.lwjgl.stb

Class STBVorbisComment

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class STBVorbisComment extends Struct<STBVorbisComment> implements NativeResource

 struct stb_vorbis_comment {
     char * vendor;
     int comment_list_length;
     char ** comment_list;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VENDOR
      The struct member offsets.
    • COMMENT_LIST_LENGTH

      public static final int COMMENT_LIST_LENGTH
      The struct member offsets.
    • COMMENT_LIST

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

    • STBVorbisComment

      public STBVorbisComment(ByteBuffer container)
      Creates a STBVorbisComment 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<STBVorbisComment>
    • vendor

      public ByteBuffer vendor()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the vendor field.
    • vendorString

      public String vendorString()
      Returns:
      the null-terminated string pointed to by the vendor field.
    • comment_list_length

      public int comment_list_length()
      Returns:
      the value of the comment_list_length field.
    • comment_list

      public PointerBuffer comment_list()
      Returns:
      a PointerBuffer view of the data pointed to by the comment_list field.
    • malloc

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

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

      public static STBVorbisComment create()
      Returns a new STBVorbisComment instance allocated with BufferUtils.
    • create

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

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

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

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

      public static STBVorbisComment.Buffer create(int capacity)
      Returns a new STBVorbisComment.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

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

      public static STBVorbisComment calloc(MemoryStack stack)
      Returns a new STBVorbisComment instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

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

      public static STBVorbisComment.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new STBVorbisComment.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
    • nvendor

      public static ByteBuffer nvendor(long struct)
      Unsafe version of vendor().
    • nvendorString

      public static String nvendorString(long struct)
      Unsafe version of vendorString().
    • ncomment_list_length

      public static int ncomment_list_length(long struct)
      Unsafe version of comment_list_length().
    • ncomment_list

      public static PointerBuffer ncomment_list(long struct)
      Unsafe version of comment_list.