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 MusicctxData()
Audio context data, depends on typectxData
(MemorySegment value) Audio context data, depends on typeint
ctxType()
Type of music context (audio filetype)ctxType
(int value) Type of music context (audio filetype)boolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalint
Total number of frames (considering channels)frameCount
(int value) Total number of frames (considering channels)getArrayElement
(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()
boolean
looping()
Music looping enablelooping
(boolean value) Music looping enablevoid
setCtxData
(MemorySegment value) Audio context data, depends on typevoid
setCtxType
(int value) Type of music context (audio filetype)void
setFrameCount
(int value) Total number of frames (considering channels)void
setLooping
(boolean value) Music looping enablevoid
setStream
(AudioStream value) Audio streamstream()
Audio streamstream
(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 -
stream
Audio stream -
stream
Audio stream -
getFrameCount
public int getFrameCount()Total number of frames (considering channels) -
setFrameCount
public void setFrameCount(int value) Total number of frames (considering channels) -
frameCount
public int frameCount()Total number of frames (considering channels) -
frameCount
Total number of frames (considering channels) -
getLooping
public boolean getLooping()Music looping enable -
setLooping
public void setLooping(boolean value) Music looping enable -
looping
public boolean looping()Music looping enable -
looping
Music looping enable -
getCtxType
public int getCtxType()Type of music context (audio filetype) -
setCtxType
public void setCtxType(int value) Type of music context (audio filetype) -
ctxType
public int ctxType()Type of music context (audio filetype) -
ctxType
Type of music context (audio filetype) -
getCtxData
Audio context data, depends on type -
setCtxData
Audio context data, depends on type -
ctxData
Audio context data, depends on type -
ctxData
Audio context data, depends on type
-