Class FMOD_CODEC_WAVEFORMAT

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FMOD_CODEC_WAVEFORMAT extends Struct<FMOD_CODEC_WAVEFORMAT> implements NativeResource

 struct FMOD_CODEC_WAVEFORMAT {
     char const * name;
     FMOD_SOUND_FORMAT format;
     int channels;
     int frequency;
     unsigned int lengthbytes;
     unsigned int lengthpcm;
     unsigned int pcmblocksize;
     int loopstart;
     int loopend;
     FMOD_MODE mode;
     FMOD_CHANNELMASK channelmask;
     FMOD_CHANNELORDER channelorder;
     float peakvolume;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NAME
      The struct member offsets.
    • FORMAT

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

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

      public static final int FREQUENCY
      The struct member offsets.
    • LENGTHBYTES

      public static final int LENGTHBYTES
      The struct member offsets.
    • LENGTHPCM

      public static final int LENGTHPCM
      The struct member offsets.
    • PCMBLOCKSIZE

      public static final int PCMBLOCKSIZE
      The struct member offsets.
    • LOOPSTART

      public static final int LOOPSTART
      The struct member offsets.
    • LOOPEND

      public static final int LOOPEND
      The struct member offsets.
    • MODE

      public static final int MODE
      The struct member offsets.
    • CHANNELMASK

      public static final int CHANNELMASK
      The struct member offsets.
    • CHANNELORDER

      public static final int CHANNELORDER
      The struct member offsets.
    • PEAKVOLUME

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

    • FMOD_CODEC_WAVEFORMAT

      public FMOD_CODEC_WAVEFORMAT(ByteBuffer container)
      Creates a FMOD_CODEC_WAVEFORMAT 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_CODEC_WAVEFORMAT>
    • name

      public @Nullable ByteBuffer name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the name field.
    • nameString

      public @Nullable String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • format

      public int format()
      Returns:
      the value of the format field.
    • channels

      public int channels()
      Returns:
      the value of the channels field.
    • frequency

      public int frequency()
      Returns:
      the value of the frequency field.
    • lengthbytes

      public int lengthbytes()
      Returns:
      the value of the lengthbytes field.
    • lengthpcm

      public int lengthpcm()
      Returns:
      the value of the lengthpcm field.
    • pcmblocksize

      public int pcmblocksize()
      Returns:
      the value of the pcmblocksize field.
    • loopstart

      public int loopstart()
      Returns:
      the value of the loopstart field.
    • loopend

      public int loopend()
      Returns:
      the value of the loopend field.
    • mode

      public int mode()
      Returns:
      the value of the mode field.
    • channelmask

      public int channelmask()
      Returns:
      the value of the channelmask field.
    • channelorder

      public int channelorder()
      Returns:
      the value of the channelorder field.
    • peakvolume

      public float peakvolume()
      Returns:
      the value of the peakvolume field.
    • name

      public FMOD_CODEC_WAVEFORMAT name(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the name field.
    • format

      public FMOD_CODEC_WAVEFORMAT format(int value)
      Sets the specified value to the format field.
    • channels

      public FMOD_CODEC_WAVEFORMAT channels(int value)
      Sets the specified value to the channels field.
    • frequency

      public FMOD_CODEC_WAVEFORMAT frequency(int value)
      Sets the specified value to the frequency field.
    • lengthbytes

      public FMOD_CODEC_WAVEFORMAT lengthbytes(int value)
      Sets the specified value to the lengthbytes field.
    • lengthpcm

      public FMOD_CODEC_WAVEFORMAT lengthpcm(int value)
      Sets the specified value to the lengthpcm field.
    • pcmblocksize

      public FMOD_CODEC_WAVEFORMAT pcmblocksize(int value)
      Sets the specified value to the pcmblocksize field.
    • loopstart

      public FMOD_CODEC_WAVEFORMAT loopstart(int value)
      Sets the specified value to the loopstart field.
    • loopend

      public FMOD_CODEC_WAVEFORMAT loopend(int value)
      Sets the specified value to the loopend field.
    • mode

      public FMOD_CODEC_WAVEFORMAT mode(int value)
      Sets the specified value to the mode field.
    • channelmask

      public FMOD_CODEC_WAVEFORMAT channelmask(int value)
      Sets the specified value to the channelmask field.
    • channelorder

      public FMOD_CODEC_WAVEFORMAT channelorder(int value)
      Sets the specified value to the channelorder field.
    • peakvolume

      public FMOD_CODEC_WAVEFORMAT peakvolume(float value)
      Sets the specified value to the peakvolume field.
    • set

      public FMOD_CODEC_WAVEFORMAT set(@Nullable ByteBuffer name, int format, int channels, int frequency, int lengthbytes, int lengthpcm, int pcmblocksize, int loopstart, int loopend, int mode, int channelmask, int channelorder, float peakvolume)
      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_CODEC_WAVEFORMAT malloc()
      Returns a new FMOD_CODEC_WAVEFORMAT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static @Nullable ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static @Nullable String nnameString(long struct)
      Unsafe version of nameString().
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().
    • nchannels

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

      public static int nfrequency(long struct)
      Unsafe version of frequency().
    • nlengthbytes

      public static int nlengthbytes(long struct)
      Unsafe version of lengthbytes().
    • nlengthpcm

      public static int nlengthpcm(long struct)
      Unsafe version of lengthpcm().
    • npcmblocksize

      public static int npcmblocksize(long struct)
      Unsafe version of pcmblocksize().
    • nloopstart

      public static int nloopstart(long struct)
      Unsafe version of loopstart().
    • nloopend

      public static int nloopend(long struct)
      Unsafe version of loopend().
    • nmode

      public static int nmode(long struct)
      Unsafe version of mode().
    • nchannelmask

      public static int nchannelmask(long struct)
      Unsafe version of channelmask().
    • nchannelorder

      public static int nchannelorder(long struct)
      Unsafe version of channelorder().
    • npeakvolume

      public static float npeakvolume(long struct)
      Unsafe version of peakvolume().
    • nname

      public static void nname(long struct, @Nullable ByteBuffer value)
      Unsafe version of name.
    • nformat

      public static void nformat(long struct, int value)
      Unsafe version of format.
    • nchannels

      public static void nchannels(long struct, int value)
      Unsafe version of channels.
    • nfrequency

      public static void nfrequency(long struct, int value)
      Unsafe version of frequency.
    • nlengthbytes

      public static void nlengthbytes(long struct, int value)
      Unsafe version of lengthbytes.
    • nlengthpcm

      public static void nlengthpcm(long struct, int value)
      Unsafe version of lengthpcm.
    • npcmblocksize

      public static void npcmblocksize(long struct, int value)
      Unsafe version of pcmblocksize.
    • nloopstart

      public static void nloopstart(long struct, int value)
      Unsafe version of loopstart.
    • nloopend

      public static void nloopend(long struct, int value)
      Unsafe version of loopend.
    • nmode

      public static void nmode(long struct, int value)
      Unsafe version of mode.
    • nchannelmask

      public static void nchannelmask(long struct, int value)
      Unsafe version of channelmask.
    • nchannelorder

      public static void nchannelorder(long struct, int value)
      Unsafe version of channelorder.
    • npeakvolume

      public static void npeakvolume(long struct, float value)
      Unsafe version of peakvolume.