[Freeswitch-svn] [commit] r8192 - freeswitch/trunk/libs/voipcodecs/src

Freeswitch SVN mikej at freeswitch.org
Thu Apr 24 09:52:20 EDT 2008


Author: mikej
Date: Thu Apr 24 09:52:19 2008
New Revision: 8192

Modified:
   freeswitch/trunk/libs/voipcodecs/src/oki_adpcm.c

Log:
tweak to silence warnings.

Modified: freeswitch/trunk/libs/voipcodecs/src/oki_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/voipcodecs/src/oki_adpcm.c	(original)
+++ freeswitch/trunk/libs/voipcodecs/src/oki_adpcm.c	Thu Apr 24 09:52:19 2008
@@ -177,7 +177,7 @@
         e += (ss >> 1);
     /*endif*/
     if (adpcm & 0x04)
-        e += ss;
+        e = (int16_t)(e + ss);
     /*endif*/
     if (adpcm & 0x08)
         e = -e;
@@ -192,7 +192,7 @@
     /*endif*/
 
     s->last = linear;
-    s->step_index += step_adjustment[adpcm & 0x07];
+    s->step_index = (int16_t)(s->step_index + step_adjustment[adpcm & 0x07]);
     if (s->step_index < 0)
         s->step_index = 0;
     else if (s->step_index > 48)
@@ -221,13 +221,13 @@
     if (e >= ss)
     {
         adpcm |= (uint8_t) 0x04;
-        e -= ss;
+        e = (int16_t)(e - ss);
     }
     /*endif*/
     if (e >= (ss >> 1))
     {
         adpcm |= (uint8_t) 0x02;
-        e -= ss;
+        e = (int16_t)(e - ss);
     }
     /*endif*/
     if (e >= (ss >> 2))



More information about the Freeswitch-svn mailing list