[Freeswitch-svn] [commit] r5973 - in freeswitch/trunk/src: . mod/codecs/mod_l16
Freeswitch SVN
anthm at freeswitch.org
Thu Oct 18 14:29:54 EDT 2007
Author: anthm
Date: Thu Oct 18 14:29:54 2007
New Revision: 5973
Modified:
freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
freeswitch/trunk/src/switch_core_codec.c
Log:
small change
Modified: freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c Thu Oct 18 14:29:54 2007
@@ -197,7 +197,7 @@
/*.ianacode */ 117,
/*.iananame */ "L16",
/*.fmtp */ NULL,
- /*.samples_per_second */ 8000,
+ /*.samples_per_second */ 16000,
/*.bits_per_second */ 256000,
/*.microseconds_per_frame */ 120000,
/*.samples_per_frame */ 1920,
Modified: freeswitch/trunk/src/switch_core_codec.c
==============================================================================
--- freeswitch/trunk/src/switch_core_codec.c (original)
+++ freeswitch/trunk/src/switch_core_codec.c Thu Oct 18 14:29:54 2007
@@ -95,6 +95,12 @@
memset(codec, 0, sizeof(*codec));
+
+ if (channels == 2) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stereo is not currently supported. please downsample audio source to mono.\n");
+ return SWITCH_STATUS_GENERR;
+ }
+
if ((codec_interface = switch_loadable_module_get_codec_interface(codec_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid codec %s!\n", codec_name);
return SWITCH_STATUS_GENERR;
More information about the Freeswitch-svn
mailing list