mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +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:
@@ -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