Package org.lwjgl.ovr
Class OVRAudioChannelData
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Store audio PCM data (as 32b float samples) for an audio channel.
Note: needs to be released with _ReleaseAudioChannelData
to avoid memory leak.
Layout
struct ovrAudioChannelData {
float const * Samples()
;
int SamplesCount()
;
int Frequency()
;
}
-
Nested Class Summary
Nested 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
Modifier 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 size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionOVRAudioChannelData
(ByteBuffer container) Creates aOVRAudioChannelData
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRAudioChannelData
calloc()
Returns a newOVRAudioChannelData
instance allocated withmemCalloc
.static OVRAudioChannelData.Buffer
calloc
(int capacity) Returns a newOVRAudioChannelData.Buffer
instance allocated withmemCalloc
.static OVRAudioChannelData.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOVRAudioChannelData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRAudioChannelData
calloc
(MemoryStack stack) Returns a newOVRAudioChannelData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRAudioChannelData
Deprecated.static OVRAudioChannelData.Buffer
callocStack
(int capacity) Deprecated.static OVRAudioChannelData.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static OVRAudioChannelData
callocStack
(MemoryStack stack) Deprecated.static OVRAudioChannelData
create()
Returns a newOVRAudioChannelData
instance allocated withBufferUtils
.static OVRAudioChannelData.Buffer
create
(int capacity) Returns a newOVRAudioChannelData.Buffer
instance allocated withBufferUtils
.static OVRAudioChannelData
create
(long address) Returns a newOVRAudioChannelData
instance for the specified memory address.static OVRAudioChannelData.Buffer
create
(long address, int capacity) Create aOVRAudioChannelData.Buffer
instance at the specified memory.static OVRAudioChannelData
createSafe
(long address) static OVRAudioChannelData.Buffer
createSafe
(long address, int capacity) int
frequency (e.g.static OVRAudioChannelData
malloc()
Returns a newOVRAudioChannelData
instance allocated withmemAlloc
.static OVRAudioChannelData.Buffer
malloc
(int capacity) Returns a newOVRAudioChannelData.Buffer
instance allocated withmemAlloc
.static OVRAudioChannelData.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOVRAudioChannelData.Buffer
instance allocated on the specifiedMemoryStack
.static OVRAudioChannelData
malloc
(MemoryStack stack) Returns a newOVRAudioChannelData
instance allocated on the specifiedMemoryStack
.static OVRAudioChannelData
Deprecated.static OVRAudioChannelData.Buffer
mallocStack
(int capacity) Deprecated.static OVRAudioChannelData.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static OVRAudioChannelData
mallocStack
(MemoryStack stack) Deprecated.static int
nFrequency
(long struct) Unsafe version ofFrequency()
.static FloatBuffer
nSamples
(long struct) Unsafe version ofSamples
.static int
nSamplesCount
(long struct) Unsafe version ofSamplesCount()
.Samples()
samples stored as floats[-1.0f, 1.0f]
int
number of samplesint
sizeof()
Returnssizeof(struct)
.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. -
SAMPLES
public static final int SAMPLESThe struct member offsets. -
SAMPLESCOUNT
public static final int SAMPLESCOUNTThe struct member offsets. -
FREQUENCY
public static final int FREQUENCYThe struct member offsets.
-
-
Constructor Details
-
OVRAudioChannelData
Creates aOVRAudioChannelData
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)
.- Specified by:
sizeof
in classStruct<OVRAudioChannelData>
-
Samples
samples stored as floats[-1.0f, 1.0f]
-
SamplesCount
public int SamplesCount()number of samples -
Frequency
public int Frequency()frequency (e.g. 44100) -
malloc
Returns a newOVRAudioChannelData
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOVRAudioChannelData
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOVRAudioChannelData
instance allocated withBufferUtils
. -
create
Returns a newOVRAudioChannelData
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRAudioChannelData.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOVRAudioChannelData.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOVRAudioChannelData.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOVRAudioChannelData.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newOVRAudioChannelData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOVRAudioChannelData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOVRAudioChannelData.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOVRAudioChannelData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nSamples
Unsafe version ofSamples
. -
nSamplesCount
public static int nSamplesCount(long struct) Unsafe version ofSamplesCount()
. -
nFrequency
public static int nFrequency(long struct) Unsafe version ofFrequency()
.
-