audio quantize

## GstAudioQuantize

## GstAudio.AudioQuantize

### Methods

#### gst_audio_quantize_free

    gst_audio_quantize_free (GstAudioQuantize * quant)

Free a GstAudioQuantize.

Parameters:

`quant` –

a GstAudioQuantize

#### GstAudio.AudioQuantize.prototype.free

    function GstAudio.AudioQuantize.prototype.free(): {
        // javascript wrapper for 'gst_audio_quantize_free'
    }

Free a GstAudio.AudioQuantize.

Parameters:

`quant` (GstAudio.AudioQuantize) –

a GstAudio.AudioQuantize

#### GstAudio.AudioQuantize.free

    def GstAudio.AudioQuantize.free (self):
        #python wrapper for 'gst_audio_quantize_free'

Free a GstAudio.AudioQuantize.

Parameters:

`quant` (GstAudio.AudioQuantize) –

a GstAudio.AudioQuantize

#### gst_audio_quantize_reset

    gst_audio_quantize_reset (GstAudioQuantize * quant)

Reset quant to the state is was when created, clearing any history it might have.

Parameters:

`quant` –

a GstAudioQuantize

#### GstAudio.AudioQuantize.prototype.reset

    function GstAudio.AudioQuantize.prototype.reset(): {
        // javascript wrapper for 'gst_audio_quantize_reset'
    }

Reset quant to the state is was when created, clearing any history it might have.

Parameters:

`quant` (GstAudio.AudioQuantize) –

a GstAudio.AudioQuantize

#### GstAudio.AudioQuantize.reset

    def GstAudio.AudioQuantize.reset (self):
        #python wrapper for 'gst_audio_quantize_reset'

Reset quant to the state is was when created, clearing any history it might have.

Parameters:

`quant` (GstAudio.AudioQuantize) –

a GstAudio.AudioQuantize

#### gst_audio_quantize_samples

    gst_audio_quantize_samples (GstAudioQuantize * quant,
                                const gpointer * in,
                                gpointer * out,
                                guint 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:

`quant` –

a GstAudioQuantize

`in` –

input samples

`out` –

output samples

`samples` –

number of samples

#### GstAudio.AudioQuantize.prototype.samples

    function GstAudio.AudioQuantize.prototype.samples(in: Object, out: Object, samples: Number): {
        // javascript wrapper for 'gst_audio_quantize_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:

`quant` (GstAudio.AudioQuantize) –

a GstAudio.AudioQuantize

`in` (Object) –

input samples

`out` (Object) –

output samples

`samples` (Number) –

number of samples

#### GstAudio.AudioQuantize.samples

    def GstAudio.AudioQuantize.samples (self, in, out, samples):
        #python wrapper for 'gst_audio_quantize_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:

`quant` (GstAudio.AudioQuantize) –

a GstAudio.AudioQuantize

`in` (object) –

input samples

`out` (object) –

output samples

`samples` (int) –

number of samples

### Functions

#### gst_audio_quantize_new

    GstAudioQuantize *
    gst_audio_quantize_new (GstAudioDitherMethod dither,
                            GstAudioNoiseShapingMethod ns,
                            GstAudioQuantizeFlags flags,
                            GstAudioFormat format,
                            guint channels,
                            guint 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.

## Enumerations

### GstAudioDitherMethod

Set of available dithering methods.

##### Members

`GST_AUDIO_DITHER_NONE` (0) –

No dithering

`GST_AUDIO_DITHER_RPDF` (1) –

Rectangular dithering

`GST_AUDIO_DITHER_TPDF` (2) –

Triangular dithering (default)

`GST_AUDIO_DITHER_TPDF_HF` (3) –

High frequency triangular dithering

### GstAudio.AudioDitherMethod

Set of available dithering methods.

##### Members

`GstAudio.AudioDitherMethod.NONE` (0) –

No dithering

`GstAudio.AudioDitherMethod.RPDF` (1) –

Rectangular dithering

`GstAudio.AudioDitherMethod.TPDF` (2) –

Triangular dithering (default)

`GstAudio.AudioDitherMethod.TPDF_HF` (3) –

High frequency triangular dithering

### GstAudio.AudioDitherMethod

Set of available dithering methods.

##### Members

`GstAudio.AudioDitherMethod.NONE` (0) –

No dithering

`GstAudio.AudioDitherMethod.RPDF` (1) –

Rectangular dithering

`GstAudio.AudioDitherMethod.TPDF` (2) –

Triangular dithering (default)

`GstAudio.AudioDitherMethod.TPDF_HF` (3) –

High frequency triangular dithering

### GstAudioNoiseShapingMethod

Set of available noise shaping methods

##### Members

`GST_AUDIO_NOISE_SHAPING_NONE` (0) –

No noise shaping (default)

`GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK` (1) –

Error feedback

`GST_AUDIO_NOISE_SHAPING_SIMPLE` (2) –

Simple 2-pole noise shaping

`GST_AUDIO_NOISE_SHAPING_MEDIUM` (3) –

Medium 5-pole noise shaping

`GST_AUDIO_NOISE_SHAPING_HIGH` (4) –

High 8-pole noise shaping

### GstAudio.AudioNoiseShapingMethod

Set of available noise shaping methods

##### Members

`GstAudio.AudioNoiseShapingMethod.NONE` (0) –

No noise shaping (default)

`GstAudio.AudioNoiseShapingMethod.ERROR_FEEDBACK` (1) –

Error feedback

`GstAudio.AudioNoiseShapingMethod.SIMPLE` (2) –

Simple 2-pole noise shaping

`GstAudio.AudioNoiseShapingMethod.MEDIUM` (3) –

Medium 5-pole noise shaping

`GstAudio.AudioNoiseShapingMethod.HIGH` (4) –

High 8-pole noise shaping

### GstAudio.AudioNoiseShapingMethod

Set of available noise shaping methods

##### Members

`GstAudio.AudioNoiseShapingMethod.NONE` (0) –

No noise shaping (default)

`GstAudio.AudioNoiseShapingMethod.ERROR_FEEDBACK` (1) –

Error feedback

`GstAudio.AudioNoiseShapingMethod.SIMPLE` (2) –

Simple 2-pole noise shaping

`GstAudio.AudioNoiseShapingMethod.MEDIUM` (3) –

Medium 5-pole noise shaping

`GstAudio.AudioNoiseShapingMethod.HIGH` (4) –

High 8-pole noise shaping

### GstAudioQuantizeFlags

Extra flags that can be passed to gst_audio_quantize_new

##### Members

`GST_AUDIO_QUANTIZE_FLAG_NONE` (0) –

no flags

`GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED` (1) –

samples are non-interleaved

### GstAudio.AudioQuantizeFlags

Extra flags that can be passed to gst_audio_quantize_new (not introspectable)

##### Members

`GstAudio.AudioQuantizeFlags.NONE` (0) –

no flags

`GstAudio.AudioQuantizeFlags.NON_INTERLEAVED` (1) –

samples are non-interleaved

### GstAudio.AudioQuantizeFlags

Extra flags that can be passed to gst_audio_quantize_new (not introspectable)

##### Members

`GstAudio.AudioQuantizeFlags.NONE` (0) –

no flags

`GstAudio.AudioQuantizeFlags.NON_INTERLEAVED` (1) –

samples are non-interleaved

The results of the search are