ref: a4848367b5f8fbc5d65d47502b7c56ddac885ef6
parent: 64440768922150d8ae8b01ddad387be61d0e9acf
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Sat Jan 21 16:31:12 EST 2017
opusenc: Avoid resampler fractional sample offset Signed-off-by: Mark Harris <mark.hsj@gmail.com>
--- a/src/audio-in.c
+++ b/src/audio-in.c
@@ -1012,7 +1012,7 @@
rs->resampler = speex_resampler_init(rs->channels, opt->rate, outfreq, complexity, &err);
if(err!=0)fprintf(stderr, _("resampler error: %s\n"), speex_resampler_strerror(err));
- opt->skip+=speex_resampler_get_output_latency(rs->resampler);
+ speex_resampler_skip_zeros(rs->resampler);
rs->bufs = malloc(sizeof(float) * rs->bufsize * opt->channels);