Package com.raylib
Class Wave
java.lang.Object
com.raylib.Wave
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionWave()
Construct with auto memory allocator and fields initialized to zero.Wave
(int frameCount, int sampleRate, int sampleSize, int channels, MemorySegment data) Construct with auto memory allocator and fields initialized as specifiedWave
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectWave
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedWave
(SegmentAllocator arena, int frameCount, int sampleRate, int sampleSize, int channels, MemorySegment data) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Wave
allocateArray
(long elementCount) Allocate an array of Wavestatic Wave
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Waveboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) int
Number of channels (1-mono, 2-stereo, ...)getData()
Buffer data pointerint
Total number of frames (considering channels)int
Frequency (samples per second)int
Bit depth (bits per sample): 8, 16, 32 (24 not supported)int
hashCode()
setChannels
(int value) Number of channels (1-mono, 2-stereo, ...)setData
(MemorySegment value) Buffer data pointersetFrameCount
(int value) Total number of frames (considering channels)setSampleRate
(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
-
Wave
public Wave()Construct with auto memory allocator and fields initialized to zero. -
Wave
Construct with your owm memory allocator and fields not initialized -
Wave
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Wave
Construct with auto memory allocator and fields initialized as specified- Parameters:
frameCount
- Total number of frames (considering channels)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, ...)data
- Buffer data pointer
-
Wave
public Wave(SegmentAllocator arena, int frameCount, int sampleRate, int sampleSize, int channels, MemorySegment data) Construct with your own memory allocator and fields initialized as specified- Parameters:
frameCount
- Total number of frames (considering channels)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, ...)data
- Buffer data pointer
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Wave -
allocateArray
Allocate an array of Wave -
getFrameCount
public int getFrameCount()Total number of frames (considering channels) -
setFrameCount
Total number of frames (considering channels) -
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, ...) -
getData
Buffer data pointer -
setData
Buffer data pointer
-