Package org.lwjgl.util.opus
Class OpusEncCallbacks
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.opus.OpusEncCallbacks
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OpusEncCallbacks extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceCallback functions for accessing the stream.Layout
struct OpusEncCallbacks {ope_write_funcwrite();ope_close_funcclose; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpusEncCallbacks.BufferAn array ofOpusEncCallbacksstructs.
-
Constructor Summary
Constructors Constructor Description OpusEncCallbacks(java.nio.ByteBuffer container)Creates aOpusEncCallbacksinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpusEncCallbackscalloc()Returns a newOpusEncCallbacksinstance allocated withmemCalloc.static OpusEncCallbacks.Buffercalloc(int capacity)Returns a newOpusEncCallbacks.Bufferinstance allocated withmemCalloc.static OpusEncCallbacks.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOpusEncCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OpusEncCallbackscalloc(org.lwjgl.system.MemoryStack stack)Returns a newOpusEncCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.OPECloseFuncclose$()callback for closing the streamOpusEncCallbacksclose$(OPECloseFuncI value)Sets the specified value to theclose$()field.static OpusEncCallbackscreate()Returns a newOpusEncCallbacksinstance allocated withBufferUtils.static OpusEncCallbacks.Buffercreate(int capacity)Returns a newOpusEncCallbacks.Bufferinstance allocated withBufferUtils.static OpusEncCallbackscreate(long address)Returns a newOpusEncCallbacksinstance for the specified memory address.static OpusEncCallbacks.Buffercreate(long address, int capacity)Create aOpusEncCallbacks.Bufferinstance at the specified memory.static OpusEncCallbackscreateSafe(long address)static OpusEncCallbacks.BuffercreateSafe(long address, int capacity)static OpusEncCallbacksmalloc()Returns a newOpusEncCallbacksinstance allocated withmemAlloc.static OpusEncCallbacks.Buffermalloc(int capacity)Returns a newOpusEncCallbacks.Bufferinstance allocated withmemAlloc.static OpusEncCallbacks.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOpusEncCallbacks.Bufferinstance allocated on the specifiedMemoryStack.static OpusEncCallbacksmalloc(org.lwjgl.system.MemoryStack stack)Returns a newOpusEncCallbacksinstance allocated on the specifiedMemoryStack.static OPECloseFuncnclose$(long struct)Unsafe version ofclose$().static voidnclose$(long struct, OPECloseFuncI value)Unsafe version ofclose$.static OPEWriteFuncnwrite(long struct)Unsafe version ofwrite().static voidnwrite(long struct, OPEWriteFuncI value)Unsafe version ofwrite.OpusEncCallbacksset(OPEWriteFuncI write, OPECloseFuncI close$)Initializes this struct with the specified values.OpusEncCallbacksset(OpusEncCallbacks src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.OPEWriteFuncwrite()callback for writing to the streamOpusEncCallbackswrite(OPEWriteFuncI value)Sets the specified value to thewrite()field.
-
-
-
Constructor Detail
-
OpusEncCallbacks
public OpusEncCallbacks(java.nio.ByteBuffer container)
Creates aOpusEncCallbacksinstance 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
-
write
public OPEWriteFunc write()
callback for writing to the stream
-
close$
public OPECloseFunc close$()
callback for closing the stream
-
write
public OpusEncCallbacks write(OPEWriteFuncI value)
Sets the specified value to thewrite()field.
-
close$
public OpusEncCallbacks close$(OPECloseFuncI value)
Sets the specified value to theclose$()field.
-
set
public OpusEncCallbacks set(OPEWriteFuncI write, OPECloseFuncI close$)
Initializes this struct with the specified values.
-
set
public OpusEncCallbacks set(OpusEncCallbacks src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static OpusEncCallbacks malloc()
Returns a newOpusEncCallbacksinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OpusEncCallbacks calloc()
Returns a newOpusEncCallbacksinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OpusEncCallbacks create()
Returns a newOpusEncCallbacksinstance allocated withBufferUtils.
-
create
public static OpusEncCallbacks create(long address)
Returns a newOpusEncCallbacksinstance for the specified memory address.
-
createSafe
@Nullable public static OpusEncCallbacks createSafe(long address)
-
malloc
public static OpusEncCallbacks.Buffer malloc(int capacity)
Returns a newOpusEncCallbacks.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OpusEncCallbacks.Buffer calloc(int capacity)
Returns a newOpusEncCallbacks.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OpusEncCallbacks.Buffer create(int capacity)
Returns a newOpusEncCallbacks.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OpusEncCallbacks.Buffer create(long address, int capacity)
Create aOpusEncCallbacks.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static OpusEncCallbacks.Buffer createSafe(long address, int capacity)
-
malloc
public static OpusEncCallbacks malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpusEncCallbacksinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OpusEncCallbacks calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpusEncCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static OpusEncCallbacks.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOpusEncCallbacks.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static OpusEncCallbacks.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOpusEncCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nwrite
public static OPEWriteFunc nwrite(long struct)
Unsafe version ofwrite().
-
nclose$
public static OPECloseFunc nclose$(long struct)
Unsafe version ofclose$().
-
nwrite
public static void nwrite(long struct, OPEWriteFuncI value)Unsafe version ofwrite.
-
nclose$
public static void nclose$(long struct, OPECloseFuncI value)Unsafe version ofclose$.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-