mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
codec tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1957 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -202,8 +202,6 @@ static switch_status_t switch_speex_encode(switch_codec_t *codec,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
speex_bits_pack(&context->encoder_bits, 15, 5);
|
||||
*encoded_data_len = speex_bits_write(&context->encoder_bits, (char *) encoded_data, context->encoder_frame_size);
|
||||
speex_bits_reset(&context->encoder_bits);
|
||||
@@ -226,6 +224,7 @@ static switch_status_t switch_speex_decode(switch_codec_t *codec,
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
buf = decoded_data;
|
||||
if (*flag & SWITCH_CODEC_FLAG_SILENCE) {
|
||||
speex_decode_int(context->decoder_state, NULL, buf);
|
||||
@@ -276,7 +275,7 @@ static const switch_codec_implementation_t speex_32k_implementation = {
|
||||
/*.nanoseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 640,
|
||||
/*.bytes_per_frame */ 1280,
|
||||
/*.encoded_bytes_per_frame */ 43,
|
||||
/*.encoded_bytes_per_frame */ 0,
|
||||
/*.number_of_channels */ 1,
|
||||
/*.pref_frames_per_packet */ 1,
|
||||
/*.max_frames_per_packet */ 1,
|
||||
@@ -295,7 +294,7 @@ static const switch_codec_implementation_t speex_16k_implementation = {
|
||||
/*.nanoseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 320,
|
||||
/*.bytes_per_frame */ 640,
|
||||
/*.encoded_bytes_per_frame */ 43,
|
||||
/*.encoded_bytes_per_frame */ 0,
|
||||
/*.number_of_channels */ 1,
|
||||
/*.pref_frames_per_packet */ 1,
|
||||
/*.max_frames_per_packet */ 1,
|
||||
@@ -315,7 +314,7 @@ static const switch_codec_implementation_t speex_8k_implementation = {
|
||||
/*.nanoseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
/*.bytes_per_frame */ 320,
|
||||
/*.encoded_bytes_per_frame */ 29,
|
||||
/*.encoded_bytes_per_frame */ 0,
|
||||
/*.number_of_channels */ 1,
|
||||
/*.pref_frames_per_packet */ 1,
|
||||
/*.max_frames_per_packet */ 1,
|
||||
|
Reference in New Issue
Block a user