Skip to content
Snippets Groups Projects
Commit 00641af7 authored by Joshua Colp's avatar Joshua Colp
Browse files

Add support for 16KHz signed linear.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent c77dddf3
No related branches found
No related tags found
No related merge requests found
...@@ -56,14 +56,14 @@ int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f) ...@@ -56,14 +56,14 @@ int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f)
struct ast_frame *begin_frame = f, *duped_frame = NULL, *frame_ptr; struct ast_frame *begin_frame = f, *duped_frame = NULL, *frame_ptr;
unsigned int x; unsigned int x;
if (f->subclass != AST_FORMAT_SLINEAR) { if (f->subclass != AST_FORMAT_SLINEAR && f->subclass != AST_FORMAT_SLINEAR16) {
if (sf->trans && f->subclass != sf->format) { if (sf->trans && f->subclass != sf->format) {
ast_translator_free_path(sf->trans); ast_translator_free_path(sf->trans);
sf->trans = NULL; sf->trans = NULL;
} }
if (!sf->trans) { if (!sf->trans) {
if (!(sf->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, f->subclass))) { if (!(sf->trans = ast_translator_build_path((f->subclass == AST_FORMAT_G722 ? AST_FORMAT_SLINEAR16 : AST_FORMAT_SLINEAR), f->subclass))) {
ast_log(LOG_WARNING, "Cannot build a path from %s to slin\n", ast_getformatname(f->subclass)); ast_log(LOG_WARNING, "Cannot build a path from %s to slin\n", ast_getformatname(f->subclass));
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment