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 Deprecated Methods Modifier and Type Method Description java.nio.ByteBufferalloc_buffer()STBVorbisAllocalloc_buffer(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thealloc_bufferfield.intalloc_buffer_length_in_bytes()static STBVorbisAlloccalloc()Returns a newSTBVorbisAllocinstance allocated withmemCalloc.static STBVorbisAlloc.Buffercalloc(int capacity)Returns a newSTBVorbisAlloc.Bufferinstance allocated withmemCalloc.static STBVorbisAlloc.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAlloc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBVorbisAlloccalloc(org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBVorbisAlloccallocStack()Deprecated.static STBVorbisAlloc.BuffercallocStack(int capacity)Deprecated.static STBVorbisAlloc.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static STBVorbisAlloccallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 STBVorbisAlloc.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAlloc.Bufferinstance allocated on the specifiedMemoryStack.static STBVorbisAllocmalloc(org.lwjgl.system.MemoryStack stack)Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStack.static STBVorbisAllocmallocStack()Deprecated.static STBVorbisAlloc.BuffermallocStack(int capacity)Deprecated.static STBVorbisAlloc.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static STBVorbisAllocmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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.
-
-
-
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:
- a
ByteBufferview of the data pointed to by thealloc_bufferfield.
-
alloc_buffer_length_in_bytes
public int alloc_buffer_length_in_bytes()
- Returns:
- the value of the
alloc_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
@Deprecated public static STBVorbisAlloc mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBVorbisAlloc callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBVorbisAlloc mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBVorbisAlloc callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBVorbisAlloc.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static STBVorbisAlloc.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static STBVorbisAlloc.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static STBVorbisAlloc.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static STBVorbisAlloc malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSTBVorbisAllocinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static STBVorbisAlloc calloc(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
-
malloc
public static STBVorbisAlloc.Buffer malloc(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
-
calloc
public static STBVorbisAlloc.Buffer calloc(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
-
-