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 and Description static class
STBVorbisAlloc.Buffer
An array ofSTBVorbisAlloc
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor and 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 and Description int
alloc_buffer_length_in_bytes()
Returns the value of thealloc_buffer_length_in_bytes
field.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.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 ornull
if the address isNULL
.static STBVorbisAlloc.Buffer
create(long address, int capacity)
Create aSTBVorbisAlloc.Buffer
instance at the specified memory.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
.STBVorbisAlloc
nset(long struct)
Unsafe version ofset
.STBVorbisAlloc
set(STBVorbisAlloc src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 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()
Description copied from class:org.lwjgl.system.Struct
Returns thesizeof(struct)
.- 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.
-
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 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 ornull
if the address isNULL
.
-
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
-
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
-
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
-
-