Package com.raylib
Class Music
java.lang.Object
com.raylib.Music
Music, audio stream, anything longer than ~10 seconds should be streamed
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionMusic()
Construct with auto memory allocator and fields initialized to zero.Music
(AudioStream stream, int frameCount, boolean looping, int ctxType, MemorySegment ctxData) Construct with auto memory allocator and fields initialized as specifiedMusic
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectMusic
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedMusic
(SegmentAllocator arena, AudioStream stream, int frameCount, boolean looping, int ctxType, MemorySegment ctxData) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Music
allocateArray
(long elementCount) Allocate an array of Musicstatic Music
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Musicboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) Audio context data, depends on typeint
Type of music context (audio filetype)int
Total number of frames (considering channels)boolean
Music looping enableAudio streamint
hashCode()
setCtxData
(MemorySegment value) Audio context data, depends on typesetCtxType
(int value) Type of music context (audio filetype)setFrameCount
(int value) Total number of frames (considering channels)setLooping
(boolean value) Music looping enablesetStream
(AudioStream value) Audio stream
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Music
public Music()Construct with auto memory allocator and fields initialized to zero. -
Music
Construct with your owm memory allocator and fields not initialized -
Music
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Music
public Music(AudioStream stream, int frameCount, boolean looping, int ctxType, MemorySegment ctxData) Construct with auto memory allocator and fields initialized as specified- Parameters:
stream
- Audio streamframeCount
- Total number of frames (considering channels)looping
- Music looping enablectxType
- Type of music context (audio filetype)ctxData
- Audio context data, depends on type
-
Music
public Music(SegmentAllocator arena, AudioStream stream, int frameCount, boolean looping, int ctxType, MemorySegment ctxData) Construct with your own memory allocator and fields initialized as specified- Parameters:
stream
- Audio streamframeCount
- Total number of frames (considering channels)looping
- Music looping enablectxType
- Type of music context (audio filetype)ctxData
- Audio context data, depends on type
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Music -
allocateArray
Allocate an array of Music -
getStream
Audio stream -
setStream
Audio stream -
getFrameCount
public int getFrameCount()Total number of frames (considering channels) -
setFrameCount
Total number of frames (considering channels) -
getLooping
public boolean getLooping()Music looping enable -
setLooping
Music looping enable -
getCtxType
public int getCtxType()Type of music context (audio filetype) -
setCtxType
Type of music context (audio filetype) -
getCtxData
Audio context data, depends on type -
setCtxData
Audio context data, depends on type
-