audio-converter: add reset function
authorWim Taymans <wtaymans@redhat.com>
Tue, 26 Jan 2016 15:56:57 +0000 (16:56 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 26 Jan 2016 16:19:34 +0000 (17:19 +0100)
gst-libs/gst/audio/audio-converter.c
gst-libs/gst/audio/audio-converter.h
win32/common/libgstaudio.def

index abd9070..0792345 100644 (file)
@@ -973,6 +973,20 @@ gst_audio_converter_get_max_latency (GstAudioConverter * convert)
 }
 
 /**
+ * gst_audio_converter_reset:
+ * @convert: a #GstAudioConverter
+ *
+ * Reset @convert to the state it was when it was first created, clearing
+ * any history it might currently have.
+ */
+void
+gst_audio_converter_reset (GstAudioConverter * convert)
+{
+  if (convert->quant)
+    gst_audio_quantize_reset (convert->quant);
+}
+
+/**
  * gst_audio_converter_samples:
  * @convert: a #GstAudioConverter
  * @flags: extra #GstAudioConverterFlags
index 6251d2f..6d037db 100644 (file)
@@ -79,6 +79,8 @@ GstAudioConverter *  gst_audio_converter_new             (GstAudioConverterFlags
 
 void                 gst_audio_converter_free            (GstAudioConverter * convert);
 
+void                 gst_audio_converter_reset           (GstAudioConverter * convert);
+
 gboolean             gst_audio_converter_update_config   (GstAudioConverter * convert,
                                                           gint in_rate, gint out_rate,
                                                           GstStructure *config);
index 2691430..d0b7f44 100644 (file)
@@ -53,6 +53,7 @@ EXPORTS
        gst_audio_converter_get_max_latency
        gst_audio_converter_get_out_frames
        gst_audio_converter_new
+       gst_audio_converter_reset
        gst_audio_converter_samples
        gst_audio_converter_update_config
        gst_audio_decoder_allocate_output_buffer
@@ -150,6 +151,7 @@ EXPORTS
        gst_audio_quantize_flags_get_type
        gst_audio_quantize_free
        gst_audio_quantize_new
+       gst_audio_quantize_reset
        gst_audio_quantize_samples
        gst_audio_reorder_channels
        gst_audio_ring_buffer_acquire