From: Russell Bryant Date: Thu, 10 Jan 2008 23:10:00 +0000 (+0000) Subject: Fix the buffer_samples value. For signed linear, the number of samples needed X-Git-Tag: 1.6.0-beta1~3^2~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a5bfb9eb8b6fd241f85063f583bb514b7c2bdd9;p=thirdparty%2Fasterisk.git Fix the buffer_samples value. For signed linear, the number of samples needed to fill the buffer is half the buffer size. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97974 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/codecs/codec_resample.c b/codecs/codec_resample.c index 76641ce50d..9be951c9c6 100644 --- a/codecs/codec_resample.c +++ b/codecs/codec_resample.c @@ -206,7 +206,7 @@ static struct ast_translator slin8_to_slin16 = { .framein = slin8_to_slin16_framein, .sample = slin8_to_slin16_sample, .desc_size = sizeof(struct slin8_to_slin16_pvt), - .buffer_samples = OUTBUF_SIZE, + .buffer_samples = (OUTBUF_SIZE / sizeof(int16_t)), .buf_size = OUTBUF_SIZE, };