Record Class STB_VorbisInfo

java.lang.Object
java.lang.Record
club.doki7.stb.vorbis.datatype.STB_VorbisInfo
All Implemented Interfaces:
IPointer, ISTB_VorbisInfo

@ValueBasedCandidate @UnsafeConstructor public record STB_VorbisInfo(@NotNull MemorySegment segment) extends Record implements ISTB_VorbisInfo

Represents a pointer to a stb_vorbis_info structure in native memory.

Structure

typedef struct stb_vorbis_info {
    int sampleRate;
    int channels;
    int setupMemoryRequired;
    int setupTempMemoryRequired;
    int tempMemoryRequired;
    int maxFrameSize;
} stb_vorbis_info;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$sampleRate

      public static final MemoryLayout.PathElement PATH$sampleRate
    • PATH$channels

      public static final MemoryLayout.PathElement PATH$channels
    • PATH$setupMemoryRequired

      public static final MemoryLayout.PathElement PATH$setupMemoryRequired
    • PATH$setupTempMemoryRequired

      public static final MemoryLayout.PathElement PATH$setupTempMemoryRequired
    • PATH$tempMemoryRequired

      public static final MemoryLayout.PathElement PATH$tempMemoryRequired
    • PATH$maxFrameSize

      public static final MemoryLayout.PathElement PATH$maxFrameSize
    • LAYOUT$sampleRate

      public static final ValueLayout.OfInt LAYOUT$sampleRate
    • LAYOUT$channels

      public static final ValueLayout.OfInt LAYOUT$channels
    • LAYOUT$setupMemoryRequired

      public static final ValueLayout.OfInt LAYOUT$setupMemoryRequired
    • LAYOUT$setupTempMemoryRequired

      public static final ValueLayout.OfInt LAYOUT$setupTempMemoryRequired
    • LAYOUT$tempMemoryRequired

      public static final ValueLayout.OfInt LAYOUT$tempMemoryRequired
    • LAYOUT$maxFrameSize

      public static final ValueLayout.OfInt LAYOUT$maxFrameSize
    • SIZE$sampleRate

      public static final long SIZE$sampleRate
    • SIZE$channels

      public static final long SIZE$channels
    • SIZE$setupMemoryRequired

      public static final long SIZE$setupMemoryRequired
    • SIZE$setupTempMemoryRequired

      public static final long SIZE$setupTempMemoryRequired
    • SIZE$tempMemoryRequired

      public static final long SIZE$tempMemoryRequired
    • SIZE$maxFrameSize

      public static final long SIZE$maxFrameSize
    • OFFSET$sampleRate

      public static final long OFFSET$sampleRate
    • OFFSET$channels

      public static final long OFFSET$channels
    • OFFSET$setupMemoryRequired

      public static final long OFFSET$setupMemoryRequired
    • OFFSET$setupTempMemoryRequired

      public static final long OFFSET$setupTempMemoryRequired
    • OFFSET$tempMemoryRequired

      public static final long OFFSET$tempMemoryRequired
    • OFFSET$maxFrameSize

      public static final long OFFSET$maxFrameSize
  • Constructor Details

    • STB_VorbisInfo

      public STB_VorbisInfo(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a STB_VorbisInfo record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details

    • allocate

      public static STB_VorbisInfo allocate(Arena arena)
    • allocate

      public static STB_VorbisInfo.Ptr allocate(Arena arena, long count)
    • clone

      public static STB_VorbisInfo clone(Arena arena, STB_VorbisInfo src)
    • sampleRate

      public int sampleRate()
    • sampleRate

      public STB_VorbisInfo sampleRate(int value)
    • channels

      public int channels()
    • channels

      public STB_VorbisInfo channels(int value)
    • setupMemoryRequired

      public int setupMemoryRequired()
    • setupMemoryRequired

      public STB_VorbisInfo setupMemoryRequired(int value)
    • setupTempMemoryRequired

      public int setupTempMemoryRequired()
    • setupTempMemoryRequired

      public STB_VorbisInfo setupTempMemoryRequired(int value)
    • tempMemoryRequired

      public int tempMemoryRequired()
    • tempMemoryRequired

      public STB_VorbisInfo tempMemoryRequired(int value)
    • maxFrameSize

      public int maxFrameSize()
    • maxFrameSize

      public STB_VorbisInfo maxFrameSize(int value)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • segment

      @NotNull public @NotNull MemorySegment segment()
      Returns the value of the segment record component.
      Specified by:
      segment in interface IPointer
      Returns:
      the value of the segment record component