ref: 6e5d6ad588df30fbacd3a0b8e2fb802b2b8e0803
parent: 2f4f0468650a116d3b7faf0432d51fac1f8c48f7
author: Karl Tomlinson <ktomlinson@mozilla.com>
date: Wed Jun 25 12:56:30 EDT 2014
resample: complete speex_resampler_reset_mem Cherry-picked from speexdsp 91cc0a39e5098d0400c78e1c8a9ad874bec8611b Signed-off-by: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
--- a/src/resample.c
+++ b/src/resample.c
@@ -1122,6 +1122,12 @@
SPX_RESAMPLE_EXPORT int speex_resampler_reset_mem(SpeexResamplerState *st)
{
spx_uint32_t i;
+ for (i=0;i<st->nb_channels;i++)
+ {
+ st->last_sample[i] = 0;
+ st->magic_samples[i] = 0;
+ st->samp_frac_num[i] = 0;
+ }
for (i=0;i<st->nb_channels*(st->filt_len-1);i++)
st->mem[i] = 0;
return RESAMPLER_ERR_SUCCESS;