提交 89a2799c authored 作者: Michael Jerris's avatar Michael Jerris

fix msvc 2005 core warnings

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11991 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 156f0292
...@@ -171,7 +171,7 @@ SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, i ...@@ -171,7 +171,7 @@ SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, i
SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples); SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples);
SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, uint32_t samples, uint32_t channels); SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t channels);
SWITCH_END_EXTERN_C SWITCH_END_EXTERN_C
#endif #endif
......
...@@ -933,7 +933,7 @@ static switch_xml_t add_xml_header(switch_xml_t xml, char *name, char *value, in ...@@ -933,7 +933,7 @@ static switch_xml_t add_xml_header(switch_xml_t xml, char *name, char *value, in
switch_xml_t header = switch_xml_add_child_d(xml, name, offset); switch_xml_t header = switch_xml_add_child_d(xml, name, offset);
if (header) { if (header) {
int encode_len = (strlen(value) * 3) + 1; switch_size_t encode_len = (strlen(value) * 3) + 1;
char *encode_buf = malloc(encode_len); char *encode_buf = malloc(encode_len);
switch_assert(encode_buf); switch_assert(encode_buf);
......
...@@ -239,7 +239,7 @@ SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples ...@@ -239,7 +239,7 @@ SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples
for (i = 0; i < samples; i++, sum_rnd = 0) { for (i = 0; i < samples; i++, sum_rnd = 0) {
for (x = 0; x < 10; x++) { for (x = 0; x < 10; x++) {
rnd += (int16_t)((x + i) * rnd2); rnd = rnd + (int16_t)((x + i) * rnd2);
sum_rnd += rnd; sum_rnd += rnd;
} }
switch_normalize_to_16bit(sum_rnd); switch_normalize_to_16bit(sum_rnd);
...@@ -271,11 +271,12 @@ SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16 ...@@ -271,11 +271,12 @@ SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16
return x; return x;
} }
SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, uint32_t samples, uint32_t channels) SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t channels)
{ {
int16_t *buf; int16_t *buf;
switch_size_t len = samples * sizeof(int16_t); switch_size_t len = samples * sizeof(int16_t);
uint32_t i = 0, j = 0, k = 0; switch_size_t i = 0;
uint32_t j = 0, k = 0;
switch_zmalloc(buf, len); switch_zmalloc(buf, len);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论