git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5992 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-10-19 15:31:02 +00:00
1 parent a65e34e233
commit 6b1fa2191b
17 files changed
+53 -51

No files matched your search

+4 -4
View File
@@ -93,11 +93,11 @@ static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_fla
const SpeexMode *mode = NULL;
context->codec = codec;
if (codec->implementation->samples_per_second == 8000) {
if (codec->implementation->actual_samples_per_second == 8000) {
mode = &speex_nb_mode;
} else if (codec->implementation->samples_per_second == 16000) {
} else if (codec->implementation->actual_samples_per_second == 16000) {
mode = &speex_wb_mode;
} else if (codec->implementation->samples_per_second == 32000) {
} else if (codec->implementation->actual_samples_per_second == 32000) {
mode = &speex_uwb_mode;
}
@@ -111,7 +111,7 @@ static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_fla
speex_encoder_ctl(context->encoder_state, SPEEX_GET_FRAME_SIZE, &context->encoder_frame_size);
speex_encoder_ctl(context->encoder_state, SPEEX_SET_COMPLEXITY, &codec->codec_settings.complexity);
if (codec->codec_settings.preproc) {
context->pp = speex_preprocess_state_init(context->encoder_frame_size, codec->implementation->samples_per_second);
context->pp = speex_preprocess_state_init(context->encoder_frame_size, codec->implementation->actual_samples_per_second);
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_VAD, &codec->codec_settings.pp_vad);
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_AGC, &codec->codec_settings.pp_agc);
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_AGC_LEVEL, &codec->codec_settings.pp_agc_level);