[Freeswitch-svn] [commit] r12935 - freeswitch/trunk/src/include

FreeSWITCH SVN anthm at freeswitch.org
Tue Apr 7 08:23:12 PDT 2009


Author: anthm
Date: Tue Apr  7 10:23:12 2009
New Revision: 12935

Log:
drop divide by 2 from normalize func

Modified:
   freeswitch/trunk/src/include/switch_utils.h

Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h	(original)
+++ freeswitch/trunk/src/include/switch_utils.h	Tue Apr  7 10:23:12 2009
@@ -61,7 +61,7 @@
 #define switch_samples_per_packet(rate, interval) ((uint32_t)((float)rate / (1000.0f / (float)interval)))
 #define SWITCH_SMAX 32767
 #define SWITCH_SMIN -32768
-#define switch_normalize_to_16bit(n) if (n > SWITCH_SMAX) n = SWITCH_SMAX / 2; else if (n < SWITCH_SMIN) n = SWITCH_SMIN / 2;
+#define switch_normalize_to_16bit(n) if (n > SWITCH_SMAX) n = SWITCH_SMAX; else if (n < SWITCH_SMIN) n = SWITCH_SMIN;
 #define switch_codec2str(codec,buf,len) snprintf(buf, len, "%s@%uh@%ui", \
                                                  codec->implementation->iananame, \
                                                  codec->implementation->samples_per_second, \



More information about the Freeswitch-svn mailing list