aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp1
-rw-r--r--libspeex/resample.c13
2 files changed, 7 insertions, 7 deletions
diff --git a/Android.bp b/Android.bp
index 16d0819..4fd0d46 100644
--- a/Android.bp
+++ b/Android.bp
@@ -42,6 +42,7 @@ cc_library_shared {
"-fprefetch-loop-arrays",
"-Wall",
"-Werror",
+ "-Wno-sign-compare",
],
local_include_dirs: ["include"],
diff --git a/libspeex/resample.c b/libspeex/resample.c
index ed4cfa3..1eeef20 100644
--- a/libspeex/resample.c
+++ b/libspeex/resample.c
@@ -600,7 +600,7 @@ static void update_filter(SpeexResamplerState *st)
}
for (i=0;i<st->den_rate;i++)
{
- spx_uint32_t j;
+ spx_int32_t j;
for (j=0;j<st->filt_len;j++)
{
st->sinc_table[i*st->filt_len+j] = sinc(st->cutoff,((j-(spx_int32_t)st->filt_len/2+1)-((float)i)/st->den_rate), st->filt_len, quality_map[st->quality].window_func);
@@ -672,7 +672,7 @@ static void update_filter(SpeexResamplerState *st)
}
for (i=st->nb_channels-1;i>=0;i--)
{
- spx_uint32_t j;
+ spx_int32_t j;
spx_uint32_t olen = old_length;
/*if (st->magic_samples[i])*/
{
@@ -680,9 +680,8 @@ static void update_filter(SpeexResamplerState *st)
/* FIXME: This is wrong but for now we need it to avoid going over the array bounds */
olen = old_length + 2*st->magic_samples[i];
- spx_int32_t k;
- for (k=old_length-2+st->magic_samples[i];k>=0;k--)
- st->mem[i*st->mem_alloc_size+k+st->magic_samples[i]] = st->mem[i*old_alloc_size+k];
+ for (j=old_length-2+st->magic_samples[i];j>=0;j--)
+ st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]] = st->mem[i*old_alloc_size+j];
for (j=0;j<st->magic_samples[i];j++)
st->mem[i*st->mem_alloc_size+j] = 0;
st->magic_samples[i] = 0;
@@ -851,7 +850,7 @@ EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t cha
EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
#endif
{
- spx_uint32_t j;
+ int j;
spx_uint32_t ilen = *in_len;
spx_uint32_t olen = *out_len;
spx_word16_t *x = st->mem + channel_index * st->mem_alloc_size;
@@ -892,7 +891,7 @@ EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t c
EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
#endif
{
- spx_uint32_t j;
+ int j;
const int istride_save = st->in_stride;
const int ostride_save = st->out_stride;
spx_uint32_t ilen = *in_len;