Package org.lwjgl.ovr
Class OVRAudioChannelData
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRAudioChannelData
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRAudioChannelData extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStore audio PCM data (as 32b float samples) for an audio channel.Note: needs to be released with
_ReleaseAudioChannelDatato avoid memory leak.Layout
struct ovrAudioChannelData { float const *Samples(); intSamplesCount(); intFrequency(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOVRAudioChannelData.BufferAn array ofOVRAudioChannelDatastructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFREQUENCY
SAMPLES
SAMPLESCOUNTThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description OVRAudioChannelData(java.nio.ByteBuffer container)Creates aOVRAudioChannelDatainstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static OVRAudioChannelDatacalloc()Returns a newOVRAudioChannelDatainstance allocated withmemCalloc.static OVRAudioChannelData.Buffercalloc(int capacity)Returns a newOVRAudioChannelData.Bufferinstance allocated withmemCalloc.static OVRAudioChannelData.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRAudioChannelData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRAudioChannelDatacalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRAudioChannelDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRAudioChannelDatacallocStack()Deprecated.static OVRAudioChannelData.BuffercallocStack(int capacity)Deprecated.static OVRAudioChannelData.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRAudioChannelDatacallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static OVRAudioChannelDatacreate()Returns a newOVRAudioChannelDatainstance allocated withBufferUtils.static OVRAudioChannelData.Buffercreate(int capacity)Returns a newOVRAudioChannelData.Bufferinstance allocated withBufferUtils.static OVRAudioChannelDatacreate(long address)Returns a newOVRAudioChannelDatainstance for the specified memory address.static OVRAudioChannelData.Buffercreate(long address, int capacity)Create aOVRAudioChannelData.Bufferinstance at the specified memory.static OVRAudioChannelDatacreateSafe(long address)static OVRAudioChannelData.BuffercreateSafe(long address, int capacity)intFrequency()frequency (e.g.static OVRAudioChannelDatamalloc()Returns a newOVRAudioChannelDatainstance allocated withmemAlloc.static OVRAudioChannelData.Buffermalloc(int capacity)Returns a newOVRAudioChannelData.Bufferinstance allocated withmemAlloc.static OVRAudioChannelData.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRAudioChannelData.Bufferinstance allocated on the specifiedMemoryStack.static OVRAudioChannelDatamalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRAudioChannelDatainstance allocated on the specifiedMemoryStack.static OVRAudioChannelDatamallocStack()Deprecated.static OVRAudioChannelData.BuffermallocStack(int capacity)Deprecated.static OVRAudioChannelData.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRAudioChannelDatamallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnFrequency(long struct)Unsafe version ofFrequency().static java.nio.FloatBuffernSamples(long struct)Unsafe version ofSamples.static intnSamplesCount(long struct)Unsafe version ofSamplesCount().java.nio.FloatBufferSamples()samples stored as floats[-1.0f, 1.0f]intSamplesCount()number of samplesintsizeof()
-
-
-
Constructor Detail
-
OVRAudioChannelData
public OVRAudioChannelData(java.nio.ByteBuffer container)
Creates aOVRAudioChannelDatainstance 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
-
Samples
public java.nio.FloatBuffer 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
public static OVRAudioChannelData malloc()
Returns a newOVRAudioChannelDatainstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRAudioChannelData calloc()
Returns a newOVRAudioChannelDatainstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRAudioChannelData create()
Returns a newOVRAudioChannelDatainstance allocated withBufferUtils.
-
create
public static OVRAudioChannelData create(long address)
Returns a newOVRAudioChannelDatainstance for the specified memory address.
-
createSafe
@Nullable public static OVRAudioChannelData createSafe(long address)
-
malloc
public static OVRAudioChannelData.Buffer malloc(int capacity)
Returns a newOVRAudioChannelData.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRAudioChannelData.Buffer calloc(int capacity)
Returns a newOVRAudioChannelData.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRAudioChannelData.Buffer create(int capacity)
Returns a newOVRAudioChannelData.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRAudioChannelData.Buffer create(long address, int capacity)
Create aOVRAudioChannelData.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static OVRAudioChannelData.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static OVRAudioChannelData mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRAudioChannelData callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRAudioChannelData mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRAudioChannelData callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRAudioChannelData.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static OVRAudioChannelData.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRAudioChannelData.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static OVRAudioChannelData.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static OVRAudioChannelData malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRAudioChannelDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OVRAudioChannelData calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRAudioChannelDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static OVRAudioChannelData.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRAudioChannelData.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static OVRAudioChannelData.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRAudioChannelData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nSamples
public static java.nio.FloatBuffer nSamples(long struct)
Unsafe version ofSamples.
-
nSamplesCount
public static int nSamplesCount(long struct)
Unsafe version ofSamplesCount().
-
nFrequency
public static int nFrequency(long struct)
Unsafe version ofFrequency().
-
-