audio-quantize: add _reset function

Add a reset function that clears any history.
This commit is contained in:
Wim Taymans 2016-01-26 16:34:35 +01:00
parent 183610c035
commit cde091ae81
2 changed files with 17 additions and 0 deletions

View file

@ -483,6 +483,21 @@ gst_audio_quantize_free (GstAudioQuantize * quant)
g_slice_free (GstAudioQuantize, quant);
}
/**
* gst_audio_quantize_reset:
* @quant: a #GstAudioQuantize
*
* Reset @quant to the state is was when created, clearing any
* history it might have.
*/
void
gst_audio_quantize_reset (GstAudioQuantize * quant)
{
g_free (quant->error_buf);
quant->error_buf = NULL;
quant->error_size = 0;
}
/**
* gst_audio_quantize_samples:
* @quant: a #GstAudioQuantize

View file

@ -90,6 +90,8 @@ GstAudioQuantize * gst_audio_quantize_new (GstAudioDitherMethod dither,
void gst_audio_quantize_free (GstAudioQuantize * quant);
void gst_audio_quantize_reset (GstAudioQuantize * quant);
void gst_audio_quantize_samples (GstAudioQuantize * quant,
const gpointer in[],
gpointer out[], guint samples);