diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-11-29 02:14:13 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-11-29 02:14:13 +0000 |
commit | 69399315991bf7f9679e2d9b22f42415653cfc04 (patch) | |
tree | e3349bbc37c69394a11f4358e9af9f7a5d2a2329 /codecs/codec_gsm.c | |
parent | 2d459a804c0512bbceafe63a934770c2aa3f5edd (diff) |
Version 0.3.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@556 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs/codec_gsm.c')
-rwxr-xr-x | codecs/codec_gsm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c index c84ee2897..6a3ff8054 100755 --- a/codecs/codec_gsm.c +++ b/codecs/codec_gsm.c @@ -79,7 +79,7 @@ static struct ast_frame *lintogsm_sample() f.subclass = AST_FORMAT_SLINEAR; f.datalen = sizeof(slin_gsm_ex); /* Assume 8000 Hz */ - f.timelen = sizeof(slin_gsm_ex)/16; + f.samples = sizeof(slin_gsm_ex)/2; f.mallocd = 0; f.offset = 0; f.src = __PRETTY_FUNCTION__; @@ -94,7 +94,7 @@ static struct ast_frame *gsmtolin_sample() f.subclass = AST_FORMAT_GSM; f.datalen = sizeof(gsm_slin_ex); /* All frames are 20 ms long */ - f.timelen = 20; + f.samples = 160; f.mallocd = 0; f.offset = 0; f.src = __PRETTY_FUNCTION__; @@ -112,7 +112,7 @@ static struct ast_frame *gsmtolin_frameout(struct ast_translator_pvt *tmp) tmp->f.subclass = AST_FORMAT_SLINEAR; tmp->f.datalen = tmp->tail * 2; /* Assume 8000 Hz */ - tmp->f.timelen = tmp->tail / 8; + tmp->f.samples = tmp->tail; tmp->f.mallocd = 0; tmp->f.offset = AST_FRIENDLY_OFFSET; tmp->f.src = __PRETTY_FUNCTION__; @@ -190,7 +190,7 @@ static struct ast_frame *lintogsm_frameout(struct ast_translator_pvt *tmp) x++; } tmp->f.datalen = x * 33; - tmp->f.timelen = x * 20; + tmp->f.samples = x * 160; return &tmp->f; } |