Package com.raylib
Class Wave
java.lang.Object
com.raylib.Wave
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegmentThe 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 WaveallocateArray(long elementCount) Allocate an array of Wavestatic WaveallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of WavebooleanEquality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement(int index) intNumber of channels (1-mono, 2-stereo, ...)getData()Buffer data pointerintTotal number of frames (considering channels)intFrequency (samples per second)intBit depth (bits per sample): 8, 16, 32 (24 not supported)inthashCode()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
-