Class Sound

java.lang.Object
com.raylib.Sound

public class Sound extends Object
Sound
  • Field Details

    • memorySegment

      public final MemorySegment memorySegment
      The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Details

    • Sound

      public Sound()
      Construct with auto memory allocator and fields initialized to zero.
    • Sound

      public Sound(SegmentAllocator arena)
      Construct with your owm memory allocator and fields not initialized
    • Sound

      public Sound(MemorySegment memorySegment)
      Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    • Sound

      public Sound(AudioStream stream, int frameCount)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      stream - Audio stream
      frameCount - Total number of frames (considering channels)
    • Sound

      public Sound(SegmentAllocator arena, AudioStream stream, int frameCount)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      stream - Audio stream
      frameCount - Total number of frames (considering channels)
  • Method Details

    • equals

      public boolean equals(Object o)
      Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getArrayElement

      public Sound getArrayElement(int index)
    • allocateArray

      public static Sound allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of Sound
    • allocateArray

      public static Sound allocateArray(long elementCount)
      Allocate an array of Sound
    • getStream

      public AudioStream getStream()
      Audio stream
    • setStream

      public void setStream(AudioStream value)
      Audio stream
    • stream

      public AudioStream stream()
      Audio stream
    • stream

      public Sound stream(AudioStream value)
      Audio stream
    • getFrameCount

      public int getFrameCount()
      Total number of frames (considering channels)
    • setFrameCount

      public void setFrameCount(int value)
      Total number of frames (considering channels)
    • frameCount

      public int frameCount()
      Total number of frames (considering channels)
    • frameCount

      public Sound frameCount(int value)
      Total number of frames (considering channels)