提交 4c1a2e09 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix some bugs and g726 wip (only 32 works so far)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2459 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 9b9000a1
...@@ -159,7 +159,7 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec, ...@@ -159,7 +159,7 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
//printf("new byte assign the %d bits\n", handle->bits_per_frame); //printf("new byte assign the %d bits\n", handle->bits_per_frame);
*handle->ptr = edata; *handle->ptr = edata;
} else if (bits <= BITS_IN_A_BYTE) { } else if (bits <= BITS_IN_A_BYTE) {
int shift_by = ((handle->bits_per_frame * (handle->ecount)) - handle->bits_per_frame); int shift_by = ((handle->bits_per_frame * (handle->ecount -1)));
//printf ("shift by %d and add %d bits\n", shift_by, handle->bits_per_frame); //printf ("shift by %d and add %d bits\n", shift_by, handle->bits_per_frame);
//*handle->ptr <<= shift_by; //*handle->ptr <<= shift_by;
//*handle->ptr |= edata; //*handle->ptr |= edata;
...@@ -169,7 +169,8 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec, ...@@ -169,7 +169,8 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
//print_bits(edata); //print_bits(edata);
//printf("\n"); //printf("\n");
*handle->ptr |= (edata << 4); *handle->ptr <<= shift_by;
*handle->ptr |= edata;
//printf("handle\n"); //printf("handle\n");
//print_bits(*handle->ptr); //print_bits(*handle->ptr);
......
...@@ -458,7 +458,10 @@ static char *lame(char *in) ...@@ -458,7 +458,10 @@ static char *lame(char *in)
static int do_describe(struct private_object *tech_pvt, int force) static int do_describe(struct private_object *tech_pvt, int force)
{ {
ldl_payload_t payloads[5]; ldl_payload_t payloads[5];
assert(switch_core_session_get_channel(tech_pvt->session) != NULL);
if (!tech_pvt->session) {
return 0;
}
if (switch_test_flag(tech_pvt, TFLAG_DO_DESC)) { if (switch_test_flag(tech_pvt, TFLAG_DO_DESC)) {
return 1; return 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论