[asterisk-dev] Purpose of Codecs with Multiple Sample Rates?
Joshua Colp
jcolp at digium.com
Fri Nov 20 08:08:33 CST 2015
Alexander Traud wrote:
> I asked this question in
> <https://issues.asterisk.org/jira/browse/ASTERISK-25535>:
>
> Since Asterisk 13, Signed-Linear and Speex share the same codec name for all
> sample rates, see main/codec_builtin.c:CODEC_REGISTER_AND_CACHE_NAMED(.). I
> added SILK and AMR(-WB) as formats to my Asterisk 13. They could benefit
> from this as well. However, what is the benefit of this?
I don't know if there's a particular benefit - it just makes logical
sense. Despite being different sample rates they are all the same
underlying codec. That was the reasoning behind it.
>
> Beside that, I found a drawback: ast_format_cache_get(.) does not work for
> Speex.
Can you clarify on this? A format cache is a named format - it's not a
codec. Sometimes they may be the same name though and sometimes not.
Some are also historical from before all of this work and can't be
changed. For example for Speex there's "speex", "speex16", and "speex32".
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list