Package org.lwjgl.util.opus
Class OpusHead
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct OpusHead {
int version;
int channel_count;
unsigned int pre_skip;
opus_uint32 input_sample_rate;
int output_gain;
int mapping_family;
int stream_count;
int coupled_count;
unsigned char mapping[255];
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionOpusHead(ByteBuffer container) Creates aOpusHeadinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpusHeadcalloc()Returns a newOpusHeadinstance allocated withmemCalloc.static OpusHead.Buffercalloc(int capacity) Returns a newOpusHead.Bufferinstance allocated withmemCalloc.static OpusHead.Buffercalloc(int capacity, MemoryStack stack) Returns a newOpusHead.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OpusHeadcalloc(MemoryStack stack) Returns a newOpusHeadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intintstatic OpusHeadcreate()Returns a newOpusHeadinstance allocated withBufferUtils.static OpusHead.Buffercreate(int capacity) Returns a newOpusHead.Bufferinstance allocated withBufferUtils.static OpusHeadcreate(long address) Returns a newOpusHeadinstance for the specified memory address.static OpusHead.Buffercreate(long address, int capacity) Create aOpusHead.Bufferinstance at the specified memory.static @Nullable OpusHeadcreateSafe(long address) static @Nullable OpusHead.BuffercreateSafe(long address, int capacity) intstatic OpusHeadmalloc()Returns a newOpusHeadinstance allocated withmemAlloc.static OpusHead.Buffermalloc(int capacity) Returns a newOpusHead.Bufferinstance allocated withmemAlloc.static OpusHead.Buffermalloc(int capacity, MemoryStack stack) Returns a newOpusHead.Bufferinstance allocated on the specifiedMemoryStack.static OpusHeadmalloc(MemoryStack stack) Returns a newOpusHeadinstance allocated on the specifiedMemoryStack.mapping()bytemapping(int index) intstatic intnchannel_count(long struct) Unsafe version ofchannel_count().static intncoupled_count(long struct) Unsafe version ofcoupled_count().static intninput_sample_rate(long struct) Unsafe version ofinput_sample_rate().static ByteBuffernmapping(long struct) Unsafe version ofmapping().static bytenmapping(long struct, int index) Unsafe version ofmapping.static intnmapping_family(long struct) Unsafe version ofmapping_family().static intnoutput_gain(long struct) Unsafe version ofoutput_gain().static intnpre_skip(long struct) Unsafe version ofpre_skip().static intnstream_count(long struct) Unsafe version ofstream_count().static intnversion(long struct) Unsafe version ofversion().intintpre_skip()intsizeof()Returnssizeof(struct).intintversion()Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
VERSION
public static final int VERSIONThe struct member offsets. -
CHANNEL_COUNT
public static final int CHANNEL_COUNTThe struct member offsets. -
PRE_SKIP
public static final int PRE_SKIPThe struct member offsets. -
INPUT_SAMPLE_RATE
public static final int INPUT_SAMPLE_RATEThe struct member offsets. -
OUTPUT_GAIN
public static final int OUTPUT_GAINThe struct member offsets. -
MAPPING_FAMILY
public static final int MAPPING_FAMILYThe struct member offsets. -
STREAM_COUNT
public static final int STREAM_COUNTThe struct member offsets. -
COUPLED_COUNT
public static final int COUPLED_COUNTThe struct member offsets. -
MAPPING
public static final int MAPPINGThe struct member offsets.
-
-
Constructor Details
-
OpusHead
Creates aOpusHeadinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
version
public int version()- Returns:
- the value of the
versionfield.
-
channel_count
public int channel_count()- Returns:
- the value of the
channel_countfield.
-
pre_skip
public int pre_skip()- Returns:
- the value of the
pre_skipfield.
-
input_sample_rate
public int input_sample_rate()- Returns:
- the value of the
input_sample_ratefield.
-
output_gain
public int output_gain()- Returns:
- the value of the
output_gainfield.
-
mapping_family
public int mapping_family()- Returns:
- the value of the
mapping_familyfield.
-
stream_count
public int stream_count()- Returns:
- the value of the
stream_countfield.
-
coupled_count
public int coupled_count()- Returns:
- the value of the
coupled_countfield.
-
mapping
- Returns:
- a
ByteBufferview of themappingfield.
-
mapping
public byte mapping(int index) - Returns:
- the value at the specified index of the
mappingfield.
-
malloc
Returns a newOpusHeadinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newOpusHeadinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newOpusHeadinstance allocated withBufferUtils. -
create
Returns a newOpusHeadinstance for the specified memory address. -
createSafe
-
malloc
Returns a newOpusHead.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newOpusHead.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newOpusHead.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aOpusHead.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newOpusHeadinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newOpusHeadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newOpusHead.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newOpusHead.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nversion
public static int nversion(long struct) Unsafe version ofversion(). -
nchannel_count
public static int nchannel_count(long struct) Unsafe version ofchannel_count(). -
npre_skip
public static int npre_skip(long struct) Unsafe version ofpre_skip(). -
ninput_sample_rate
public static int ninput_sample_rate(long struct) Unsafe version ofinput_sample_rate(). -
noutput_gain
public static int noutput_gain(long struct) Unsafe version ofoutput_gain(). -
nmapping_family
public static int nmapping_family(long struct) Unsafe version ofmapping_family(). -
nstream_count
public static int nstream_count(long struct) Unsafe version ofstream_count(). -
ncoupled_count
public static int ncoupled_count(long struct) Unsafe version ofcoupled_count(). -
nmapping
Unsafe version ofmapping(). -
nmapping
public static byte nmapping(long struct, int index) Unsafe version ofmapping.
-