datatype tweaks.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3193 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2006-10-25 04:47:08 +00:00
parent 08442ff2c4
commit 0be391132a
2 changed files with 4 additions and 4 deletions

View File

@@ -205,13 +205,13 @@ SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, i
if (newrate) {
int32_t tmp;
int x;
uint32_t x;
int16_t *fp = data;
for (x = 0; x < samples; x++) {
tmp = (double) div ? fp[x] / newrate : fp[x] * newrate;
tmp = (int32_t) (div ? fp[x] / newrate : fp[x] * newrate);
switch_normalize_to_16bit(tmp);
fp[x] = tmp;
fp[x] = (int16_t)tmp;
}
}
}