ref: 2019efb01a8c6eddaf93182aa653f9c3acf28081
parent: 7c700fc06fa9d83cba28aed77a94f7ef2ac28d35
author: Mark Harris <mark.hsj@gmail.com>
date: Sun Apr 29 19:08:47 EDT 2018
opusdec: Fix some compiler warnings
--- a/src/opusdec.c
+++ b/src/opusdec.c
@@ -513,7 +513,7 @@
unsigned in_len;
output=buf;
in_len = frame_size;
- out_len = 1024<maxout?1024:maxout;
+ out_len = 1024<maxout?1024:(unsigned)maxout;
speex_resampler_process_interleaved_float(resampler,
pcm, &in_len, buf, &out_len);
pcm += channels*(in_len);
@@ -538,7 +538,7 @@
for (i=0;i<(int)out_len*channels;i++)
out[i]=(short)float2int(fmaxf(-32768,fminf(output[i]*32768.f,32767)));
}
- if ((le_short(1)!=1)&&file) {
+ if ((le_short(1)!=(1))&&file) {
for (i=0;i<(int)out_len*channels;i++)
out[i]=le_short(out[i]);
}
@@ -1162,7 +1162,7 @@
if (fseek(fout,4,SEEK_SET)==0)
{
int tmp;
- tmp=le_int(audio_size+20+wav_format);
+ tmp=le_int((opus_int32)(audio_size+20+wav_format));
if (fwrite(&tmp,4,1,fout)!=1)
{
fprintf(stderr,"Error writing end length.\n");
@@ -1169,7 +1169,7 @@
}
if (fseek(fout,16+wav_format,SEEK_CUR)==0)
{
- tmp=le_int(audio_size);
+ tmp=le_int((opus_int32)audio_size);
if (fwrite(&tmp,4,1,fout)!=1)
{
fprintf(stderr,"Error writing header length.\n");