forked from Mirrors/freeswitch
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
This commit is contained in:
parent
9b9000a147
commit
4c1a2e0922
|
@ -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);
|
||||
*handle->ptr = edata;
|
||||
} 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);
|
||||
//*handle->ptr <<= shift_by;
|
||||
//*handle->ptr |= edata;
|
||||
|
@ -168,8 +168,9 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
|
|||
//printf("edata\n");
|
||||
//print_bits(edata);
|
||||
//printf("\n");
|
||||
|
||||
*handle->ptr |= (edata << 4);
|
||||
|
||||
*handle->ptr <<= shift_by;
|
||||
*handle->ptr |= edata;
|
||||
|
||||
//printf("handle\n");
|
||||
//print_bits(*handle->ptr);
|
||||
|
|
|
@ -458,7 +458,10 @@ static char *lame(char *in)
|
|||
static int do_describe(struct private_object *tech_pvt, int force)
|
||||
{
|
||||
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)) {
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue