Package com.raylib
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 AudioStreamboolean
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()
setBuffer
(MemorySegment value) Pointer to internal data used by the audio systemsetChannels
(int value) Number of channels (1-mono, 2-stereo, ...)setProcessor
(MemorySegment value) Pointer to internal data processor, useful for audio effectssetSampleRate
(int value) Frequency (samples per second)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 -
getProcessor
Pointer to internal data processor, useful for audio effects -
setProcessor
Pointer to internal data processor, useful for audio effects -
getSampleRate
public int getSampleRate()Frequency (samples per second) -
setSampleRate
Frequency (samples per second) -
getSampleSize
public int getSampleSize()Bit depth (bits per sample): 8, 16, 32 (24 not supported) -
setSampleSize
Bit depth (bits per sample): 8, 16, 32 (24 not supported) -
getChannels
public int getChannels()Number of channels (1-mono, 2-stereo, ...) -
setChannels
Number of channels (1-mono, 2-stereo, ...)
-