Class AudioDownmixMeta

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.audio.AudioDownmixMeta
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class AudioDownmixMeta extends ProxyInstance

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 Details

    • AudioDownmixMeta

      public AudioDownmixMeta(MemorySegment address)
      Create a AudioDownmixMeta proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • AudioDownmixMeta

      public AudioDownmixMeta(Arena arena)
      Allocate a new AudioDownmixMeta.
      Parameters:
      arena - to control the memory allocation scope
    • AudioDownmixMeta

      public AudioDownmixMeta()
      Allocate a new AudioDownmixMeta. The memory is allocated with Arena.ofAuto().
    • AudioDownmixMeta

      public AudioDownmixMeta(Meta meta, MemorySegment fromPosition, MemorySegment toPosition, int fromChannels, int toChannels, float[] matrix, Arena arena)
      Allocate a new AudioDownmixMeta with the fields set to the provided values.
      Parameters:
      meta - value for the field meta
      fromPosition - value for the field fromPosition
      toPosition - value for the field toPosition
      fromChannels - value for the field fromChannels
      toChannels - value for the field toChannels
      matrix - value for the field matrix
      arena - to control the memory allocation scope
    • AudioDownmixMeta

      public AudioDownmixMeta(Meta meta, MemorySegment fromPosition, MemorySegment toPosition, int fromChannels, int toChannels, float[] matrix)
      Allocate a new AudioDownmixMeta with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      meta - value for the field meta
      fromPosition - value for the field fromPosition
      toPosition - value for the field toPosition
      fromChannels - value for the field fromChannels
      toChannels - value for the field toChannels
      matrix - value for the field matrix
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readMeta

      public @Nullable Meta readMeta()
      Read the value of the field meta.
      Returns:
      The value of the field meta
    • writeMeta

      public void writeMeta(@Nullable Meta meta)
      Write a value in the field meta.
      Parameters:
      meta - The new value for the field meta
    • readFromPosition

      public MemorySegment readFromPosition()
      Read the value of the field from_position.
      Returns:
      The value of the field from_position
    • writeFromPosition

      public void writeFromPosition(MemorySegment fromPosition)
      Write a value in the field from_position.
      Parameters:
      fromPosition - The new value for the field from_position
    • readToPosition

      public MemorySegment readToPosition()
      Read the value of the field to_position.
      Returns:
      The value of the field to_position
    • writeToPosition

      public void writeToPosition(MemorySegment toPosition)
      Write a value in the field to_position.
      Parameters:
      toPosition - The new value for the field to_position
    • readFromChannels

      public int readFromChannels()
      Read the value of the field from_channels.
      Returns:
      The value of the field from_channels
    • writeFromChannels

      public void writeFromChannels(int fromChannels)
      Write a value in the field from_channels.
      Parameters:
      fromChannels - The new value for the field from_channels
    • readToChannels

      public int readToChannels()
      Read the value of the field to_channels.
      Returns:
      The value of the field to_channels
    • writeToChannels

      public void writeToChannels(int toChannels)
      Write a value in the field to_channels.
      Parameters:
      toChannels - The new value for the field to_channels
    • readMatrix

      public float[] readMatrix(int length)
      Read the value of the field matrix.
      Parameters:
      length - the number of matrix to read
      Returns:
      The value of the field matrix
    • writeMatrix

      public void writeMatrix(float[] matrix, Arena _arena)
      Write a value in the field matrix.
      Parameters:
      matrix - The new value for the field matrix
      _arena - to control the memory allocation scope
    • getInfo

      public static MetaInfo getInfo()