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 and Description static classSTBVorbisAlloc.BufferAn array ofSTBVorbisAllocstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and 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 and Description intalloc_buffer_length_in_bytes()Returns the value of thealloc_buffer_length_in_bytesfield.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.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 ornullif the address isNULL.static STBVorbisAlloc.Buffercreate(long address, int capacity)Create aSTBVorbisAlloc.Bufferinstance at the specified memory.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.STBVorbisAllocnset(long struct)Unsafe version ofset.STBVorbisAllocset(STBVorbisAlloc src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsSTBVorbisAlloc.validate(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()
Description copied from class:org.lwjgl.system.StructReturns thesizeof(struct).- 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.
-
nset
public STBVorbisAlloc nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
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
-
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)CallsSTBVorbisAlloc.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-