提交 9e5e1e7c authored 作者: Michael Jerris's avatar Michael Jerris

tweak to silence warnings.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8192 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 a5e66cd3
...@@ -177,7 +177,7 @@ static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm) ...@@ -177,7 +177,7 @@ static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm)
e += (ss >> 1); e += (ss >> 1);
/*endif*/ /*endif*/
if (adpcm & 0x04) if (adpcm & 0x04)
e += ss; e = (int16_t)(e + ss);
/*endif*/ /*endif*/
if (adpcm & 0x08) if (adpcm & 0x08)
e = -e; e = -e;
...@@ -192,7 +192,7 @@ static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm) ...@@ -192,7 +192,7 @@ static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm)
/*endif*/ /*endif*/
s->last = linear; s->last = linear;
s->step_index += step_adjustment[adpcm & 0x07]; s->step_index = (int16_t)(s->step_index + step_adjustment[adpcm & 0x07]);
if (s->step_index < 0) if (s->step_index < 0)
s->step_index = 0; s->step_index = 0;
else if (s->step_index > 48) else if (s->step_index > 48)
...@@ -221,13 +221,13 @@ static uint8_t encode(oki_adpcm_state_t *s, int16_t linear) ...@@ -221,13 +221,13 @@ static uint8_t encode(oki_adpcm_state_t *s, int16_t linear)
if (e >= ss) if (e >= ss)
{ {
adpcm |= (uint8_t) 0x04; adpcm |= (uint8_t) 0x04;
e -= ss; e = (int16_t)(e - ss);
} }
/*endif*/ /*endif*/
if (e >= (ss >> 1)) if (e >= (ss >> 1))
{ {
adpcm |= (uint8_t) 0x02; adpcm |= (uint8_t) 0x02;
e -= ss; e = (int16_t)(e - ss);
} }
/*endif*/ /*endif*/
if (e >= (ss >> 2)) if (e >= (ss >> 2))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论