From 59db8ce54262b14995042b4c0da16f4a2e466919 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 6 Nov 2015 13:02:19 +0100 Subject: [PATCH] audio-quantize: update docs Update docs Add another flag for the quantizer --- gst-libs/gst/audio/audio-quantize.c | 15 +++++++++++++++ gst-libs/gst/audio/audio-quantize.h | 11 +++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/audio/audio-quantize.c b/gst-libs/gst/audio/audio-quantize.c index 7bedd2c..3361830 100644 --- a/gst-libs/gst/audio/audio-quantize.c +++ b/gst-libs/gst/audio/audio-quantize.c @@ -420,6 +420,9 @@ count_power (guint v) * 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. + * * Returns: a new #GstAudioQuantize. Free with gst_audio_quantize_free(). */ GstAudioQuantize * @@ -472,6 +475,18 @@ gst_audio_quantize_free (GstAudioQuantize * quant) g_slice_free (GstAudioQuantize, quant); } +/** + * gst_audio_quantize_samples: + * @quant: a #GstAudioQuantize + * @src: source samples + * @dst: output samples + * @samples: number of samples + * + * Perform quantization on @samples in @src and write the result to @dst. + * + * @src and @dst may point to the same memory location, in which case samples will be + * modified in-place. + */ void gst_audio_quantize_samples (GstAudioQuantize * quant, const gpointer src, gpointer dst, guint samples) diff --git a/gst-libs/gst/audio/audio-quantize.h b/gst-libs/gst/audio/audio-quantize.h index 513867d..bc1c793 100644 --- a/gst-libs/gst/audio/audio-quantize.h +++ b/gst-libs/gst/audio/audio-quantize.h @@ -65,10 +65,17 @@ typedef enum GST_AUDIO_NOISE_SHAPING_HIGH } GstAudioNoiseShapingMethod; - +/** + * GstAudioQuantizeFlags: + * @GST_AUDIO_QUANTIZE_FLAG_NONE: no flags + * @GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED: samples are non-interleaved + * + * Extra flags that can be passed to gst_audio_quantize_new() + */ typedef enum { - GST_AUDIO_QUANTIZE_FLAG_NONE = 0 + GST_AUDIO_QUANTIZE_FLAG_NONE = 0, + GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED = (1 << 0) } GstAudioQuantizeFlags; -- 2.7.4