Class XrAudioBufferBD

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrAudioBufferBD extends Struct<XrAudioBufferBD> implements NativeResource
struct XrAudioBufferBD {
    XrStructureType type;
    void const * next;
    XrAudioBufferChannelLayoutBD channelLayout;
    uint32_t bufferChannels;
    uint32_t bufferLength;
    float * buffer;
}
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • CHANNELLAYOUT

      public static final int CHANNELLAYOUT
      The struct member offsets.
    • BUFFERCHANNELS

      public static final int BUFFERCHANNELS
      The struct member offsets.
    • BUFFERLENGTH

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

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

    • XrAudioBufferBD

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

      @NativeType("XrStructureType") public int type()
      Returns:
      the value of the type field.
    • next

      @NativeType("void const *") public long next()
      Returns:
      the value of the next field.
    • channelLayout

      @NativeType("XrAudioBufferChannelLayoutBD") public int channelLayout()
      Returns:
      the value of the channelLayout field.
    • bufferChannels

      @NativeType("uint32_t") public int bufferChannels()
      Returns:
      the value of the bufferChannels field.
    • bufferLength

      @NativeType("uint32_t") public int bufferLength()
      Returns:
      the value of the bufferLength field.
    • buffer

      @NativeType("float *") public FloatBuffer buffer()
      Returns:
      a FloatBuffer view of the data pointed to by the buffer field.
    • type

      public XrAudioBufferBD type(@NativeType("XrStructureType") int value)
      Sets the specified value to the type field.
    • type$Default

      public XrAudioBufferBD type$Default()
      Sets the TYPE_AUDIO_BUFFER_BD value to the type field.
    • next

      public XrAudioBufferBD next(@NativeType("void const *") long value)
      Sets the specified value to the next field.
    • channelLayout

      public XrAudioBufferBD channelLayout(@NativeType("XrAudioBufferChannelLayoutBD") int value)
      Sets the specified value to the channelLayout field.
    • bufferChannels

      public XrAudioBufferBD bufferChannels(@NativeType("uint32_t") int value)
      Sets the specified value to the bufferChannels field.
    • buffer

      public XrAudioBufferBD buffer(@NativeType("float *") FloatBuffer value)
      Sets the address of the specified FloatBuffer to the buffer field.
    • set

      public XrAudioBufferBD set(int type, long next, int channelLayout, int bufferChannels, FloatBuffer buffer)
      Initializes this struct with the specified values.
    • set

      public XrAudioBufferBD set(XrAudioBufferBD src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nchannelLayout

      public static int nchannelLayout(long struct)
      Unsafe version of channelLayout().
    • nbufferChannels

      public static int nbufferChannels(long struct)
      Unsafe version of bufferChannels().
    • nbufferLength

      public static int nbufferLength(long struct)
      Unsafe version of bufferLength().
    • nbuffer

      public static FloatBuffer nbuffer(long struct)
      Unsafe version of buffer.
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • nchannelLayout

      public static void nchannelLayout(long struct, int value)
      Unsafe version of channelLayout.
    • nbufferChannels

      public static void nbufferChannels(long struct, int value)
      Unsafe version of bufferChannels.
    • nbufferLength

      public static void nbufferLength(long struct, int value)
      Sets the specified value to the bufferLength field of the specified struct.
    • nbuffer

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

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