Class AudioQuantize
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorsConstructorDescriptionAudioQuantize(MemorySegment address) Create a AudioQuantize proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoidfree()Free aGstAudioQuantize.static AudioQuantizenew_(AudioDitherMethod dither, AudioNoiseShapingMethod ns, Set<AudioQuantizeFlags> flags, AudioFormat format, int channels, int quantizer) Create a new quantizer object with the given parameters.static AudioQuantizenew_(AudioDitherMethod dither, AudioNoiseShapingMethod ns, AudioQuantizeFlags flags, AudioFormat format, int channels, int quantizer) Create a new quantizer object with the given parameters.voidreset()Reset this AudioQuantize to the state is was when created, clearing any history it might have.voidsamples(@Nullable MemorySegment in, @Nullable MemorySegment out, int samples) Perform quantization onsamplesininand write the result toout.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AudioQuantize
Create a AudioQuantize proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
-
Method Details
-
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 whenquantizeris a power of 2.Dithering and noise-shaping can be performed during quantization with the
ditherandnsparameters.- Parameters:
dither- aGstAudioDitherMethodns- aGstAudioNoiseShapingMethodflags-GstAudioQuantizeFlagsformat- theGstAudioFormatof the sampleschannels- the amount of channels in the samplesquantizer- 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 whenquantizeris a power of 2.Dithering and noise-shaping can be performed during quantization with the
ditherandnsparameters.- Parameters:
dither- aGstAudioDitherMethodns- aGstAudioNoiseShapingMethodflags-GstAudioQuantizeFlagsformat- theGstAudioFormatof the sampleschannels- the amount of channels in the samplesquantizer- the quantizer to use- Returns:
- a new
GstAudioQuantize. Free with gst_audio_quantize_free().
-
free
public void free()Free aGstAudioQuantize. -
reset
public void reset()Reset this AudioQuantize to the state is was when created, clearing any history it might have. -
samples
Perform quantization onsamplesininand write the result toout.In case the samples are interleaved,
inandoutmust point to an array with a single element pointing to a block of interleaved samples.If non-interleaved samples are used,
inandoutmust point to an array with pointers to memory blocks, one for each channel.inandoutmay point to the same memory location, in which case samples will be modified in-place.- Parameters:
in- input samplesout- output samplessamples- number of samples
-