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.NativeResourceA buffer to use for allocations bySTBVorbisLayout
struct stb_vorbis_alloc { char * alloc_buffer; int alloc_buffer_length_in_bytes; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSTBVorbisAlloc.BufferAn array ofSTBVorbisAllocstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intALLOC_BUFFER
ALLOC_BUFFER_LENGTH_IN_BYTESThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description STBVorbisAlloc(java.nio.ByteBuffer container)Creates aSTBVorbisAllocinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferalloc_buffer()Returns aByteBufferview of the data pointed to by thealloc_bufferfield.STBVorbisAllocalloc_buffer(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thealloc_bufferfield.intalloc_buffer_length_in_bytes()Returns the value of thealloc_buffer_length_in_bytesfield.static STBVorbisAlloccalloc()Returns a newSTBVorbisAllocinstance allocated withmemCalloc.static STBVorbisAlloc.Buffercalloc(int capacity)Returns a newSTBVorbisAlloc.Bufferinstance allocated withmemCalloc.static STBVorbisAlloccallocStack()Returns a newSTBVorbisAllocinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBVorbisAlloc.BuffercallocStack(int capacity)Returns a newSTBVorbisAlloc.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBVorbisAlloc.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAlloc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBVorbisAlloccallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBVorbisAlloccreate()Returns a newSTBVorbisAllocinstance allocated withBufferUtils.static STBVorbisAlloc.Buffercreate(int capacity)Returns a newSTBVorbisAlloc.Bufferinstance allocated withBufferUtils.static STBVorbisAlloccreate(long address)Returns a newSTBVorbisAllocinstance for the specified memory address.static STBVorbisAlloc.Buffercreate(long address, int capacity)Create aSTBVorbisAlloc.Bufferinstance at the specified memory.static STBVorbisAlloccreateSafe(long address)static STBVorbisAlloc.BuffercreateSafe(long address, int capacity)static STBVorbisAllocmalloc()Returns a newSTBVorbisAllocinstance allocated withmemAlloc.static STBVorbisAlloc.Buffermalloc(int capacity)Returns a newSTBVorbisAlloc.Bufferinstance allocated withmemAlloc.static STBVorbisAllocmallocStack()Returns a newSTBVorbisAllocinstance allocated on the thread-localMemoryStack.static STBVorbisAlloc.BuffermallocStack(int capacity)Returns a newSTBVorbisAlloc.Bufferinstance allocated on the thread-localMemoryStack.static STBVorbisAlloc.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAlloc.Bufferinstance allocated on the specifiedMemoryStack.static STBVorbisAllocmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStack.static java.nio.ByteBuffernalloc_buffer(long struct)Unsafe version ofalloc_buffer.static voidnalloc_buffer(long struct, java.nio.ByteBuffer value)Unsafe version ofalloc_buffer.static intnalloc_buffer_length_in_bytes(long struct)Unsafe version ofalloc_buffer_length_in_bytes().static voidnalloc_buffer_length_in_bytes(long struct, int value)Sets the specified value to thealloc_buffer_length_in_bytesfield of the specifiedstruct.STBVorbisAllocset(STBVorbisAlloc src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aSTBVorbisAllocinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
alloc_buffer
public java.nio.ByteBuffer alloc_buffer()
Returns aByteBufferview of the data pointed to by thealloc_bufferfield.
-
alloc_buffer_length_in_bytes
public int alloc_buffer_length_in_bytes()
Returns the value of thealloc_buffer_length_in_bytesfield.
-
alloc_buffer
public STBVorbisAlloc alloc_buffer(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thealloc_bufferfield.
-
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 newSTBVorbisAllocinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static STBVorbisAlloc calloc()
Returns a newSTBVorbisAllocinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static STBVorbisAlloc create()
Returns a newSTBVorbisAllocinstance allocated withBufferUtils.
-
create
public static STBVorbisAlloc create(long address)
Returns a newSTBVorbisAllocinstance for the specified memory address.
-
createSafe
@Nullable public static STBVorbisAlloc createSafe(long address)
-
malloc
public static STBVorbisAlloc.Buffer malloc(int capacity)
Returns a newSTBVorbisAlloc.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static STBVorbisAlloc.Buffer calloc(int capacity)
Returns a newSTBVorbisAlloc.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static STBVorbisAlloc.Buffer create(int capacity)
Returns a newSTBVorbisAlloc.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static STBVorbisAlloc.Buffer create(long address, int capacity)
Create aSTBVorbisAlloc.Bufferinstance 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 newSTBVorbisAllocinstance allocated on the thread-localMemoryStack.
-
callocStack
public static STBVorbisAlloc callocStack()
Returns a newSTBVorbisAllocinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static STBVorbisAlloc mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static STBVorbisAlloc callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static STBVorbisAlloc.Buffer callocStack(int capacity)
Returns a newSTBVorbisAlloc.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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_bytesfield 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
-
-