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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The 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 aOpusHead
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpusHead
calloc()
Returns a newOpusHead
instance allocated withmemCalloc
.static OpusHead.Buffer
calloc
(int capacity) Returns a newOpusHead.Buffer
instance allocated withmemCalloc
.static OpusHead.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOpusHead.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OpusHead
calloc
(MemoryStack stack) Returns a newOpusHead
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
int
static OpusHead
create()
Returns a newOpusHead
instance allocated withBufferUtils
.static OpusHead.Buffer
create
(int capacity) Returns a newOpusHead.Buffer
instance allocated withBufferUtils
.static OpusHead
create
(long address) Returns a newOpusHead
instance for the specified memory address.static OpusHead.Buffer
create
(long address, int capacity) Create aOpusHead.Buffer
instance at the specified memory.static @Nullable OpusHead
createSafe
(long address) static @Nullable OpusHead.Buffer
createSafe
(long address, int capacity) int
static OpusHead
malloc()
Returns a newOpusHead
instance allocated withmemAlloc
.static OpusHead.Buffer
malloc
(int capacity) Returns a newOpusHead.Buffer
instance allocated withmemAlloc
.static OpusHead.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOpusHead.Buffer
instance allocated on the specifiedMemoryStack
.static OpusHead
malloc
(MemoryStack stack) Returns a newOpusHead
instance allocated on the specifiedMemoryStack
.mapping()
byte
mapping
(int index) int
static int
nchannel_count
(long struct) Unsafe version ofchannel_count()
.static int
ncoupled_count
(long struct) Unsafe version ofcoupled_count()
.static int
ninput_sample_rate
(long struct) Unsafe version ofinput_sample_rate()
.static ByteBuffer
nmapping
(long struct) Unsafe version ofmapping()
.static byte
nmapping
(long struct, int index) Unsafe version ofmapping
.static int
nmapping_family
(long struct) Unsafe version ofmapping_family()
.static int
noutput_gain
(long struct) Unsafe version ofoutput_gain()
.static int
npre_skip
(long struct) Unsafe version ofpre_skip()
.static int
nstream_count
(long struct) Unsafe version ofstream_count()
.static int
nversion
(long struct) Unsafe version ofversion()
.int
int
pre_skip()
int
sizeof()
Returnssizeof(struct)
.int
int
version()
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aOpusHead
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
version
public int version()- Returns:
- the value of the
version
field.
-
channel_count
public int channel_count()- Returns:
- the value of the
channel_count
field.
-
pre_skip
public int pre_skip()- Returns:
- the value of the
pre_skip
field.
-
input_sample_rate
public int input_sample_rate()- Returns:
- the value of the
input_sample_rate
field.
-
output_gain
public int output_gain()- Returns:
- the value of the
output_gain
field.
-
mapping_family
public int mapping_family()- Returns:
- the value of the
mapping_family
field.
-
stream_count
public int stream_count()- Returns:
- the value of the
stream_count
field.
-
coupled_count
public int coupled_count()- Returns:
- the value of the
coupled_count
field.
-
mapping
- Returns:
- a
ByteBuffer
view of themapping
field.
-
mapping
public byte mapping(int index) - Returns:
- the value at the specified index of the
mapping
field.
-
malloc
Returns a newOpusHead
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOpusHead
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOpusHead
instance allocated withBufferUtils
. -
create
Returns a newOpusHead
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOpusHead.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOpusHead.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOpusHead.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOpusHead.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newOpusHead
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOpusHead
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOpusHead.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOpusHead.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-