Class AudioStream

java.lang.Object
com.raylib.AudioStream

public class AudioStream extends Object
AudioStream, custom audio stream
  • Field Details

    • memorySegment

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

    • AudioStream

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

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

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

      public AudioStream(MemorySegment buffer, MemorySegment processor, int sampleRate, int sampleSize, int channels)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      buffer - Pointer to internal data used by the audio system
      processor - Pointer to internal data processor, useful for audio effects
      sampleRate - Frequency (samples per second)
      sampleSize - Bit depth (bits per sample): 8, 16, 32 (24 not supported)
      channels - Number of channels (1-mono, 2-stereo, ...)
    • AudioStream

      public AudioStream(SegmentAllocator arena, MemorySegment buffer, MemorySegment processor, int sampleRate, int sampleSize, int channels)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      buffer - Pointer to internal data used by the audio system
      processor - Pointer to internal data processor, useful for audio effects
      sampleRate - Frequency (samples per second)
      sampleSize - Bit depth (bits per sample): 8, 16, 32 (24 not supported)
      channels - Number of channels (1-mono, 2-stereo, ...)
  • 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 AudioStream getArrayElement(int index)
    • allocateArray

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

      public static AudioStream allocateArray(long elementCount)
      Allocate an array of AudioStream
    • getBuffer

      public MemorySegment getBuffer()
      Pointer to internal data used by the audio system
    • setBuffer

      public void setBuffer(MemorySegment value)
      Pointer to internal data used by the audio system
    • buffer

      public MemorySegment buffer()
      Pointer to internal data used by the audio system
    • buffer

      public AudioStream buffer(MemorySegment value)
      Pointer to internal data used by the audio system
    • getProcessor

      public MemorySegment getProcessor()
      Pointer to internal data processor, useful for audio effects
    • setProcessor

      public void setProcessor(MemorySegment value)
      Pointer to internal data processor, useful for audio effects
    • processor

      public MemorySegment processor()
      Pointer to internal data processor, useful for audio effects
    • processor

      public AudioStream processor(MemorySegment value)
      Pointer to internal data processor, useful for audio effects
    • getSampleRate

      public int getSampleRate()
      Frequency (samples per second)
    • setSampleRate

      public void setSampleRate(int value)
      Frequency (samples per second)
    • sampleRate

      public int sampleRate()
      Frequency (samples per second)
    • sampleRate

      public AudioStream sampleRate(int value)
      Frequency (samples per second)
    • getSampleSize

      public int getSampleSize()
      Bit depth (bits per sample): 8, 16, 32 (24 not supported)
    • setSampleSize

      public void setSampleSize(int value)
      Bit depth (bits per sample): 8, 16, 32 (24 not supported)
    • sampleSize

      public int sampleSize()
      Bit depth (bits per sample): 8, 16, 32 (24 not supported)
    • sampleSize

      public AudioStream sampleSize(int value)
      Bit depth (bits per sample): 8, 16, 32 (24 not supported)
    • getChannels

      public int getChannels()
      Number of channels (1-mono, 2-stereo, ...)
    • setChannels

      public void setChannels(int value)
      Number of channels (1-mono, 2-stereo, ...)
    • channels

      public int channels()
      Number of channels (1-mono, 2-stereo, ...)
    • channels

      public AudioStream channels(int value)
      Number of channels (1-mono, 2-stereo, ...)