diff options
Diffstat (limited to 'modules/mpa')
-rw-r--r-- | modules/mpa/decode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/mpa/decode.c b/modules/mpa/decode.c index 52f9304..8a92fbc 100644 --- a/modules/mpa/decode.c +++ b/modules/mpa/decode.c @@ -127,9 +127,9 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc, if (!ads || !sampv || !sampc || !buf || len<=4) return EINVAL; - if (*(uint32_t*)buf != 0) { + if (*(uint32_t*)(void *)buf != 0) { error("MPA dec header is not zero %08X, not supported yet\n", - *(uint32_t*)buf); + *(uint32_t*)(void *)buf); return EPROTO; } @@ -153,7 +153,8 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc, speex_resampler_destroy(ads->resampler); if (samplerate != MPA_IORATE) { ads->resampler = speex_resampler_init(channels, - (uint32_t)samplerate, MPA_IORATE, 3, &result); + (uint32_t)samplerate, MPA_IORATE, + 3, &result); if (result!=RESAMPLER_ERR_SUCCESS || ads->resampler==NULL) { error("MPA dec upsampler failed %d\n",result); @@ -172,9 +173,9 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc, } if (ads->resampler) { - intermediate_len = n / 2 / ads->channels; + intermediate_len = (uint32_t)(n / 2 / ads->channels); /* intermediate_len counts samples per channel */ - out_len = *sampc / 2; + out_len = (uint32_t)(*sampc / 2); result=speex_resampler_process_interleaved_int( ads->resampler, ads->intermediate_buffer, |