Package org.freedesktop.gstreamer.audio
Class AudioDownmixMeta
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.audio.AudioDownmixMeta
- All Implemented Interfaces:
Proxy
Extra buffer metadata describing audio downmixing matrix. This metadata is
attached to audio buffers and contains a matrix to downmix the buffer number
of channels to
channels
.
matrix
is an two-dimensional array of toChannels
times fromChannels
coefficients, i.e. the i-th output channels is constructed by multiplicating
the input channels with the coefficients in matrix
[i] and taking the sum
of the results.
-
Constructor Summary
ConstructorDescriptionAllocate a new AudioDownmixMeta.AudioDownmixMeta
(Arena arena) Allocate a new AudioDownmixMeta.AudioDownmixMeta
(MemorySegment address) Create a AudioDownmixMeta proxy instance for the provided memory address.AudioDownmixMeta
(Meta meta, MemorySegment fromPosition, MemorySegment toPosition, int fromChannels, int toChannels, MemorySegment[] matrix) Allocate a new AudioDownmixMeta with the fields set to the provided values.AudioDownmixMeta
(Meta meta, MemorySegment fromPosition, MemorySegment toPosition, int fromChannels, int toChannels, MemorySegment[] matrix, Arena arena) Allocate a new AudioDownmixMeta with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetaInfo
getInfo()
static MemoryLayout
The memory layout of the native struct.int
Read the value of the fieldfrom_channels
.Read the value of the fieldfrom_position
.readMatrix
(int length) Read the value of the fieldmatrix
.readMeta()
Read the value of the fieldmeta
.int
Read the value of the fieldto_channels
.Read the value of the fieldto_position
.void
writeFromChannels
(int fromChannels) Write a value in the fieldfrom_channels
.void
writeFromPosition
(MemorySegment fromPosition) Write a value in the fieldfrom_position
.void
writeMatrix
(MemorySegment[] matrix, Arena _arena) Write a value in the fieldmatrix
.void
Write a value in the fieldmeta
.void
writeToChannels
(int toChannels) Write a value in the fieldto_channels
.void
writeToPosition
(MemorySegment toPosition) Write a value in the fieldto_position
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AudioDownmixMeta
Create a AudioDownmixMeta proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
AudioDownmixMeta
Allocate a new AudioDownmixMeta.- Parameters:
arena
- to control the memory allocation scope
-
AudioDownmixMeta
public AudioDownmixMeta()Allocate a new AudioDownmixMeta. The memory is allocated withArena.ofAuto()
. -
AudioDownmixMeta
public AudioDownmixMeta(Meta meta, MemorySegment fromPosition, MemorySegment toPosition, int fromChannels, int toChannels, MemorySegment[] matrix, Arena arena) Allocate a new AudioDownmixMeta with the fields set to the provided values.- Parameters:
meta
- value for the fieldmeta
fromPosition
- value for the fieldfromPosition
toPosition
- value for the fieldtoPosition
fromChannels
- value for the fieldfromChannels
toChannels
- value for the fieldtoChannels
matrix
- value for the fieldmatrix
arena
- to control the memory allocation scope
-
AudioDownmixMeta
public AudioDownmixMeta(Meta meta, MemorySegment fromPosition, MemorySegment toPosition, int fromChannels, int toChannels, MemorySegment[] matrix) Allocate a new AudioDownmixMeta with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
meta
- value for the fieldmeta
fromPosition
- value for the fieldfromPosition
toPosition
- value for the fieldtoPosition
fromChannels
- value for the fieldfromChannels
toChannels
- value for the fieldtoChannels
matrix
- value for the fieldmatrix
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readMeta
-
writeMeta
Write a value in the fieldmeta
.- Parameters:
meta
- The new value for the fieldmeta
-
readFromPosition
Read the value of the fieldfrom_position
.- Returns:
- The value of the field
from_position
-
writeFromPosition
Write a value in the fieldfrom_position
.- Parameters:
fromPosition
- The new value for the fieldfrom_position
-
readToPosition
Read the value of the fieldto_position
.- Returns:
- The value of the field
to_position
-
writeToPosition
Write a value in the fieldto_position
.- Parameters:
toPosition
- The new value for the fieldto_position
-
readFromChannels
public int readFromChannels()Read the value of the fieldfrom_channels
.- Returns:
- The value of the field
from_channels
-
writeFromChannels
public void writeFromChannels(int fromChannels) Write a value in the fieldfrom_channels
.- Parameters:
fromChannels
- The new value for the fieldfrom_channels
-
readToChannels
public int readToChannels()Read the value of the fieldto_channels
.- Returns:
- The value of the field
to_channels
-
writeToChannels
public void writeToChannels(int toChannels) Write a value in the fieldto_channels
.- Parameters:
toChannels
- The new value for the fieldto_channels
-
readMatrix
Read the value of the fieldmatrix
.- Parameters:
length
- the number ofmatrix
to read@return The value of the fieldmatrix
-
writeMatrix
Write a value in the fieldmatrix
.- Parameters:
matrix
- The new value for the fieldmatrix
_arena
- to control the memory allocation scope
-
getInfo
-