This repository has been archived on 2023-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
speex-webrtc-test/external/SpeexDSP/speexdsp-1.2.0/regression-fixes/1-resampler_unsigned_fix.patch
2020-11-07 19:58:52 +03:00

17 lines
750 B
Diff

diff --git a/libspeex/resample.c b/libspeex/resample.c
index 4403f78..48ffcef 100644
--- a/libspeex/resample.c
+++ b/libspeex/resample.c
@@ -561,10 +561,10 @@ 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-st->filt_len/2+1)-((float)i)/st->den_rate), st->filt_len, quality_map[st->quality].window_func);
+ 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);
}
}
#ifdef FIXED_POINT