Class AudioStream
java.lang.Object
com.raylib.AudioStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct with auto memory allocator and fields initialized to zero.AudioStream
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectAudioStream
(MemorySegment buffer, MemorySegment processor, int sampleRate, int sampleSize, int channels) Construct with auto memory allocator and fields initialized as specifiedAudioStream
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedAudioStream
(SegmentAllocator arena, MemorySegment buffer, MemorySegment processor, int sampleRate, int sampleSize, int channels) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic AudioStream
allocateArray
(long elementCount) Allocate an array of AudioStreamstatic AudioStream
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of AudioStreambuffer()
Pointer to internal data used by the audio systembuffer
(MemorySegment value) Pointer to internal data used by the audio systemint
channels()
Number of channels (1-mono, 2-stereo, ...)channels
(int value) Number of channels (1-mono, 2-stereo, ...)boolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) Pointer to internal data used by the audio systemint
Number of channels (1-mono, 2-stereo, ...)Pointer to internal data processor, useful for audio effectsint
Frequency (samples per second)int
Bit depth (bits per sample): 8, 16, 32 (24 not supported)int
hashCode()
Pointer to internal data processor, useful for audio effectsprocessor
(MemorySegment value) Pointer to internal data processor, useful for audio effectsint
Frequency (samples per second)sampleRate
(int value) Frequency (samples per second)int
Bit depth (bits per sample): 8, 16, 32 (24 not supported)sampleSize
(int value) Bit depth (bits per sample): 8, 16, 32 (24 not supported)void
setBuffer
(MemorySegment value) Pointer to internal data used by the audio systemvoid
setChannels
(int value) Number of channels (1-mono, 2-stereo, ...)void
setProcessor
(MemorySegment value) Pointer to internal data processor, useful for audio effectsvoid
setSampleRate
(int value) Frequency (samples per second)void
setSampleSize
(int value) Bit depth (bits per sample): 8, 16, 32 (24 not supported)
-
Field Details
-
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
Construct with your owm memory allocator and fields not initialized -
AudioStream
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 systemprocessor
- Pointer to internal data processor, useful for audio effectssampleRate
- 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 systemprocessor
- Pointer to internal data processor, useful for audio effectssampleRate
- 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
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of AudioStream -
allocateArray
Allocate an array of AudioStream -
getBuffer
Pointer to internal data used by the audio system -
setBuffer
Pointer to internal data used by the audio system -
buffer
Pointer to internal data used by the audio system -
buffer
Pointer to internal data used by the audio system -
getProcessor
Pointer to internal data processor, useful for audio effects -
setProcessor
Pointer to internal data processor, useful for audio effects -
processor
Pointer to internal data processor, useful for audio effects -
processor
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
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
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
Number of channels (1-mono, 2-stereo, ...)
-