]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
small change
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Oct 2007 18:29:54 +0000 (18:29 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Oct 2007 18:29:54 +0000 (18:29 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5973 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_l16/mod_l16.c
src/switch_core_codec.c

index ed510c08dadcd4c7cf4604a525b27cdad2e4e089..8f601b6f46b1aaa3395bfcf62fc1932d8373dab4 100644 (file)
@@ -197,7 +197,7 @@ static switch_codec_implementation_t raw_16k_120ms_implementation = {
        /*.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,
index 3b840a354dd2697efe75100f71f33f686bd7479b..e9d6368d6005f1227f36e7016bbf1fff45d91076 100644 (file)
@@ -95,6 +95,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, ch
 
        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;