Class AudioQuantize

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

@Generated("org.javagi.JavaGI") public class AudioQuantize extends ProxyInstance
  • Constructor Details

    • AudioQuantize

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

    • getMemoryLayout

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

      public static AudioQuantize new_(AudioDitherMethod dither, AudioNoiseShapingMethod ns, Set<AudioQuantizeFlags> flags, AudioFormat format, int channels, int quantizer)

      Create a new quantizer object with the given parameters.

      Output samples will be quantized to a multiple of quantizer. Better performance is achieved when quantizer is a power of 2.

      Dithering and noise-shaping can be performed during quantization with the dither and ns parameters.

      Parameters:
      dither - a GstAudioDitherMethod
      ns - a GstAudioNoiseShapingMethod
      flags - GstAudioQuantizeFlags
      format - the GstAudioFormat of the samples
      channels - the amount of channels in the samples
      quantizer - the quantizer to use
      Returns:
      a new GstAudioQuantize. Free with gst_audio_quantize_free().
    • new_

      public static AudioQuantize new_(AudioDitherMethod dither, AudioNoiseShapingMethod ns, AudioQuantizeFlags flags, AudioFormat format, int channels, int quantizer)

      Create a new quantizer object with the given parameters.

      Output samples will be quantized to a multiple of quantizer. Better performance is achieved when quantizer is a power of 2.

      Dithering and noise-shaping can be performed during quantization with the dither and ns parameters.

      Parameters:
      dither - a GstAudioDitherMethod
      ns - a GstAudioNoiseShapingMethod
      flags - GstAudioQuantizeFlags
      format - the GstAudioFormat of the samples
      channels - the amount of channels in the samples
      quantizer - the quantizer to use
      Returns:
      a new GstAudioQuantize. Free with gst_audio_quantize_free().
    • free

      public void free()
      Free a GstAudioQuantize.
    • reset

      public void reset()
      Reset this AudioQuantize to the state is was when created, clearing any history it might have.
    • samples

      public void samples(@Nullable MemorySegment in, @Nullable MemorySegment out, int samples)

      Perform quantization on samples in in and write the result to out.

      In case the samples are interleaved, in and out must point to an array with a single element pointing to a block of interleaved samples.

      If non-interleaved samples are used, in and out must point to an array with pointers to memory blocks, one for each channel.

      in and out may point to the same memory location, in which case samples will be modified in-place.

      Parameters:
      in - input samples
      out - output samples
      samples - number of samples