Package org.lwjgl.stb
Class STBVorbisAlloc
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.stb.STBVorbisAlloc
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class STBVorbisAlloc extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
A buffer to use for allocations bySTBVorbis
Layout
struct stb_vorbis_alloc { char * alloc_buffer; int alloc_buffer_length_in_bytes; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
STBVorbisAlloc.Buffer
An array ofSTBVorbisAlloc
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ALLOC_BUFFER
ALLOC_BUFFER_LENGTH_IN_BYTESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description STBVorbisAlloc(java.nio.ByteBuffer container)
Creates aSTBVorbisAlloc
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
alloc_buffer()
Returns aByteBuffer
view of the data pointed to by thealloc_buffer
field.STBVorbisAlloc
alloc_buffer(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thealloc_buffer
field.int
alloc_buffer_length_in_bytes()
Returns the value of thealloc_buffer_length_in_bytes
field.static STBVorbisAlloc
calloc()
Returns a newSTBVorbisAlloc
instance allocated withmemCalloc
.static STBVorbisAlloc.Buffer
calloc(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated withmemCalloc
.static STBVorbisAlloc
callocStack()
Returns a newSTBVorbisAlloc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static STBVorbisAlloc.Buffer
callocStack(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static STBVorbisAlloc.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBVorbisAlloc
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBVorbisAlloc
create()
Returns a newSTBVorbisAlloc
instance allocated withBufferUtils
.static STBVorbisAlloc.Buffer
create(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated withBufferUtils
.static STBVorbisAlloc
create(long address)
Returns a newSTBVorbisAlloc
instance for the specified memory address.static STBVorbisAlloc.Buffer
create(long address, int capacity)
Create aSTBVorbisAlloc.Buffer
instance at the specified memory.static STBVorbisAlloc
createSafe(long address)
static STBVorbisAlloc.Buffer
createSafe(long address, int capacity)
static STBVorbisAlloc
malloc()
Returns a newSTBVorbisAlloc
instance allocated withmemAlloc
.static STBVorbisAlloc.Buffer
malloc(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated withmemAlloc
.static STBVorbisAlloc
mallocStack()
Returns a newSTBVorbisAlloc
instance allocated on the thread-localMemoryStack
.static STBVorbisAlloc.Buffer
mallocStack(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the thread-localMemoryStack
.static STBVorbisAlloc.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the specifiedMemoryStack
.static STBVorbisAlloc
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc
instance allocated on the specifiedMemoryStack
.static java.nio.ByteBuffer
nalloc_buffer(long struct)
Unsafe version ofalloc_buffer
.static void
nalloc_buffer(long struct, java.nio.ByteBuffer value)
Unsafe version ofalloc_buffer
.static int
nalloc_buffer_length_in_bytes(long struct)
Unsafe version ofalloc_buffer_length_in_bytes()
.static void
nalloc_buffer_length_in_bytes(long struct, int value)
Sets the specified value to thealloc_buffer_length_in_bytes
field of the specifiedstruct
.STBVorbisAlloc
set(STBVorbisAlloc src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
STBVorbisAlloc
public STBVorbisAlloc(java.nio.ByteBuffer container)
Creates aSTBVorbisAlloc
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
alloc_buffer
public java.nio.ByteBuffer alloc_buffer()
Returns aByteBuffer
view of the data pointed to by thealloc_buffer
field.
-
alloc_buffer_length_in_bytes
public int alloc_buffer_length_in_bytes()
Returns the value of thealloc_buffer_length_in_bytes
field.
-
alloc_buffer
public STBVorbisAlloc alloc_buffer(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thealloc_buffer
field.
-
set
public STBVorbisAlloc set(STBVorbisAlloc src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static STBVorbisAlloc malloc()
Returns a newSTBVorbisAlloc
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static STBVorbisAlloc calloc()
Returns a newSTBVorbisAlloc
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static STBVorbisAlloc create()
Returns a newSTBVorbisAlloc
instance allocated withBufferUtils
.
-
create
public static STBVorbisAlloc create(long address)
Returns a newSTBVorbisAlloc
instance for the specified memory address.
-
createSafe
@Nullable public static STBVorbisAlloc createSafe(long address)
-
malloc
public static STBVorbisAlloc.Buffer malloc(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static STBVorbisAlloc.Buffer calloc(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static STBVorbisAlloc.Buffer create(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static STBVorbisAlloc.Buffer create(long address, int capacity)
Create aSTBVorbisAlloc.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static STBVorbisAlloc.Buffer createSafe(long address, int capacity)
-
mallocStack
public static STBVorbisAlloc mallocStack()
Returns a newSTBVorbisAlloc
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static STBVorbisAlloc callocStack()
Returns a newSTBVorbisAlloc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static STBVorbisAlloc mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static STBVorbisAlloc callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static STBVorbisAlloc.Buffer mallocStack(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static STBVorbisAlloc.Buffer callocStack(int capacity)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static STBVorbisAlloc.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static STBVorbisAlloc.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAlloc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nalloc_buffer
public static java.nio.ByteBuffer nalloc_buffer(long struct)
Unsafe version ofalloc_buffer
.
-
nalloc_buffer_length_in_bytes
public static int nalloc_buffer_length_in_bytes(long struct)
Unsafe version ofalloc_buffer_length_in_bytes()
.
-
nalloc_buffer
public static void nalloc_buffer(long struct, java.nio.ByteBuffer value)
Unsafe version ofalloc_buffer
.
-
nalloc_buffer_length_in_bytes
public static void nalloc_buffer_length_in_bytes(long struct, int value)
Sets the specified value to thealloc_buffer_length_in_bytes
field of the specifiedstruct
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-