Class FMOD_STUDIO_BUFFER_INFO

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FMOD_STUDIO_BUFFER_INFO extends Struct<FMOD_STUDIO_BUFFER_INFO> implements NativeResource

 struct FMOD_STUDIO_BUFFER_INFO {
     int currentusage;
     int peakusage;
     int capacity;
     int stallcount;
     float stalltime;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CURRENTUSAGE
      The struct member offsets.
    • PEAKUSAGE

      public static final int PEAKUSAGE
      The struct member offsets.
    • CAPACITY

      public static final int CAPACITY
      The struct member offsets.
    • STALLCOUNT

      public static final int STALLCOUNT
      The struct member offsets.
    • STALLTIME

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

    • FMOD_STUDIO_BUFFER_INFO

      public FMOD_STUDIO_BUFFER_INFO(ByteBuffer container)
      Creates a FMOD_STUDIO_BUFFER_INFO 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_STUDIO_BUFFER_INFO>
    • currentusage

      public int currentusage()
      Returns:
      the value of the currentusage field.
    • peakusage

      public int peakusage()
      Returns:
      the value of the peakusage field.
    • capacity$

      public int capacity$()
      Returns:
      the value of the capacity field.
    • stallcount

      public int stallcount()
      Returns:
      the value of the stallcount field.
    • stalltime

      public float stalltime()
      Returns:
      the value of the stalltime field.
    • currentusage

      public FMOD_STUDIO_BUFFER_INFO currentusage(int value)
      Sets the specified value to the currentusage field.
    • peakusage

      public FMOD_STUDIO_BUFFER_INFO peakusage(int value)
      Sets the specified value to the peakusage field.
    • capacity$

      public FMOD_STUDIO_BUFFER_INFO capacity$(int value)
      Sets the specified value to the capacity field.
    • stallcount

      public FMOD_STUDIO_BUFFER_INFO stallcount(int value)
      Sets the specified value to the stallcount field.
    • stalltime

      public FMOD_STUDIO_BUFFER_INFO stalltime(float value)
      Sets the specified value to the stalltime field.
    • set

      public FMOD_STUDIO_BUFFER_INFO set(int currentusage, int peakusage, int capacity$, int stallcount, float stalltime)
      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_STUDIO_BUFFER_INFO malloc()
      Returns a new FMOD_STUDIO_BUFFER_INFO instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static FMOD_STUDIO_BUFFER_INFO calloc(MemoryStack stack)
      Returns a new FMOD_STUDIO_BUFFER_INFO 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_STUDIO_BUFFER_INFO.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FMOD_STUDIO_BUFFER_INFO.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

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

      public static int ncurrentusage(long struct)
      Unsafe version of currentusage().
    • npeakusage

      public static int npeakusage(long struct)
      Unsafe version of peakusage().
    • ncapacity$

      public static int ncapacity$(long struct)
      Unsafe version of capacity$().
    • nstallcount

      public static int nstallcount(long struct)
      Unsafe version of stallcount().
    • nstalltime

      public static float nstalltime(long struct)
      Unsafe version of stalltime().
    • ncurrentusage

      public static void ncurrentusage(long struct, int value)
      Unsafe version of currentusage.
    • npeakusage

      public static void npeakusage(long struct, int value)
      Unsafe version of peakusage.
    • ncapacity$

      public static void ncapacity$(long struct, int value)
      Unsafe version of capacity$.
    • nstallcount

      public static void nstallcount(long struct, int value)
      Unsafe version of stallcount.
    • nstalltime

      public static void nstalltime(long struct, float value)
      Unsafe version of stalltime.