mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user