From 91188e33749c1ab12d0295abbe648126f015631e Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 20 Jan 2009 01:57:01 +0000 Subject: [PATCH] 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 --- src/mod/formats/mod_shout/mod_shout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c index 14d0b0b599..27bfcc5729 100644 --- a/src/mod/formats/mod_shout/mod_shout.c +++ b/src/mod/formats/mod_shout/mod_shout.c @@ -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);