unix retool

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@255 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-01-02 18:31:50 +00:00
parent 111a0f6deb
commit a642381f25
14 changed files with 343 additions and 259 deletions

View File

@@ -113,7 +113,7 @@ SWITCH_DECLARE(size_t) switch_float_to_short(float *f, short *s, size_t len)
} else {
s[i] = (short)(ft-0.5);
}
if (s[i] > (short)MAXSAMPLE) s[i] = (short)MAXSAMPLE;
if ((float)s[i] > MAXSAMPLE) s[i] = (short)MAXSAMPLE;
if (s[i] < (short)-MAXSAMPLE) s[i] = (short)-MAXSAMPLE;
}
return len;
@@ -188,4 +188,4 @@ SWITCH_DECLARE(void) switch_swap_linear(int16_t *buf, int len)
for (i = 0; i < len; i++) {
buf[i] = ((buf[i] >> 8) & 0x00ff) | ((buf[i] << 8) & 0xff00);
}
}
}