Class FMOD_ASYNCREADINFO

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FMOD_ASYNCREADINFO extends Struct<FMOD_ASYNCREADINFO> implements NativeResource

 struct FMOD_ASYNCREADINFO {
     void * handle;
     unsigned int offset;
     unsigned int sizebytes;
     int priority;
     void * userdata;
     void * buffer;
     unsigned int bytesread;
     {@link FMOD_FILE_ASYNCDONE_FUNCI FMOD_FILE_ASYNCDONE_FUNC} done;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int HANDLE
      The struct member offsets.
    • OFFSET

      public static final int OFFSET
      The struct member offsets.
    • SIZEBYTES

      public static final int SIZEBYTES
      The struct member offsets.
    • PRIORITY

      public static final int PRIORITY
      The struct member offsets.
    • USERDATA

      public static final int USERDATA
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
    • BYTESREAD

      public static final int BYTESREAD
      The struct member offsets.
    • DONE

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

    • FMOD_ASYNCREADINFO

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

      public long handle()
      Returns:
      the value of the handle field.
    • offset

      public int offset()
      Returns:
      the value of the offset field.
    • sizebytes

      public int sizebytes()
      Returns:
      the value of the sizebytes field.
    • priority

      public int priority()
      Returns:
      the value of the priority field.
    • userdata

      public long userdata()
      Returns:
      the value of the userdata field.
    • buffer

      public ByteBuffer buffer()
      Returns:
      a ByteBuffer view of the data pointed to by the buffer field.
    • bytesread

      public int bytesread()
      Returns:
      the value of the bytesread field.
    • done

      public FMOD_FILE_ASYNCDONE_FUNC done()
      Returns:
      the value of the done field.
    • handle

      public FMOD_ASYNCREADINFO handle(long value)
      Sets the specified value to the handle field.
    • offset

      public FMOD_ASYNCREADINFO offset(int value)
      Sets the specified value to the offset field.
    • sizebytes

      public FMOD_ASYNCREADINFO sizebytes(int value)
      Sets the specified value to the sizebytes field.
    • priority

      public FMOD_ASYNCREADINFO priority(int value)
      Sets the specified value to the priority field.
    • userdata

      public FMOD_ASYNCREADINFO userdata(long value)
      Sets the specified value to the userdata field.
    • buffer

      public FMOD_ASYNCREADINFO buffer(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the buffer field.
    • done

      Sets the specified value to the done field.
    • set

      public FMOD_ASYNCREADINFO set(long handle, int offset, int sizebytes, int priority, long userdata, ByteBuffer buffer, FMOD_FILE_ASYNCDONE_FUNCI done)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nhandle(long struct)
      Unsafe version of handle().
    • noffset

      public static int noffset(long struct)
      Unsafe version of offset().
    • nsizebytes

      public static int nsizebytes(long struct)
      Unsafe version of sizebytes().
    • npriority

      public static int npriority(long struct)
      Unsafe version of priority().
    • nuserdata

      public static long nuserdata(long struct)
      Unsafe version of userdata().
    • nbuffer

      public static ByteBuffer nbuffer(long struct)
      Unsafe version of buffer.
    • nbytesread

      public static int nbytesread(long struct)
      Unsafe version of bytesread().
    • ndone

      public static FMOD_FILE_ASYNCDONE_FUNC ndone(long struct)
      Unsafe version of done().
    • nhandle

      public static void nhandle(long struct, long value)
      Unsafe version of handle.
    • noffset

      public static void noffset(long struct, int value)
      Unsafe version of offset.
    • nsizebytes

      public static void nsizebytes(long struct, int value)
      Unsafe version of sizebytes.
    • npriority

      public static void npriority(long struct, int value)
      Unsafe version of priority.
    • nuserdata

      public static void nuserdata(long struct, long value)
      Unsafe version of userdata.
    • nbuffer

      public static void nbuffer(long struct, ByteBuffer value)
      Unsafe version of buffer.
    • nbytesread

      public static void nbytesread(long struct, int value)
      Sets the specified value to the bytesread field of the specified struct.
    • ndone

      public static void ndone(long struct, FMOD_FILE_ASYNCDONE_FUNCI value)
      Unsafe version of done.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate