提交 91188e33 authored 作者: Brian West's avatar Brian West

multiples of 16 are better for when you try to record 48kHz because 144kbit is…

multiples of 16 are better for when you try to record 48kHz because 144kbit is INVALID and lame is really lame and can only say it failed -3 and not give you one bit of clue wth is wrong.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11304 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 61ee3131
......@@ -38,7 +38,7 @@
#define OUTSCALE 8192 * 2
#define MP3_SCACHE 16384 * 2
#define MP3_DCACHE 8192 *2
#define MP3_DCACHE 8192 * 2
#define MP3_TOOSMALL -1234
SWITCH_MODULE_LOAD_FUNCTION(mod_shout_load);
......@@ -692,7 +692,7 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, const char
}
context->channels = handle->channels;
lame_set_brate(context->gfp, 24 * (handle->samplerate / 8000) * handle->channels);
lame_set_brate(context->gfp, 16 * (handle->samplerate / 8000) * handle->channels);
lame_set_num_channels(context->gfp, handle->channels);
lame_set_in_samplerate(context->gfp, handle->samplerate);
lame_set_out_samplerate(context->gfp, handle->samplerate);
......@@ -1188,7 +1188,7 @@ void do_telecast(switch_stream_handle_t *stream)
lame_set_num_channels(gfp, read_codec->implementation->number_of_channels);
lame_set_in_samplerate(gfp, read_codec->implementation->actual_samples_per_second);
lame_set_brate(gfp, 24);
lame_set_brate(gfp, 16 * (read_codec->implementation->actual_samples_per_second / 8000) * read_codec->implementation->number_of_channels);
lame_set_mode(gfp, 3);
lame_set_quality(gfp, 2);
lame_set_errorf(gfp, log_error);
......@@ -1300,7 +1300,7 @@ void do_broadcast(switch_stream_handle_t *stream)
lame_set_num_channels(gfp, fh.channels);
lame_set_in_samplerate(gfp, fh.samplerate);
lame_set_brate(gfp, 24);
lame_set_brate(gfp, 16 * (fh.samplerate / 8000) * fh.channels);
lame_set_mode(gfp, 3);
lame_set_quality(gfp, 2);
lame_set_errorf(gfp, log_error);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论