mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-21 18:54:14 +00:00
unix retool
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@255 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
111a0f6deb
commit
a642381f25
14 files changed
+343
-259
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user