]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
temp fix for 8k to 48k popping.
authorBrian West <brian@freeswitch.org>
Sun, 25 Jan 2009 01:40:50 +0000 (01:40 +0000)
committerBrian West <brian@freeswitch.org>
Sun, 25 Jan 2009 01:40:50 +0000 (01:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11484 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_resample.c

index 478df61ca3153ae8faac9b13f983b6592802606b..1ff98a251b250b2e7f3de7c83d1664bd3461bae5 100644 (file)
@@ -137,9 +137,9 @@ SWITCH_DECLARE(switch_size_t) switch_float_to_short(float *f, short *s, switch_s
                        s[i] = (short) (ft - 0.5);
                }
                if ((float) s[i] > MAXSAMPLE)
-                       s[i] = (short) MAXSAMPLE;
+                       s[i] = (short) MAXSAMPLE / 2;
                if (s[i] < (short) -MAXSAMPLE)
-                       s[i] = (short) -MAXSAMPLE;
+                       s[i] = (short) -MAXSAMPLE / 2;
        }
        return len;
 }