aboutsummaryrefslogtreecommitdiff
path: root/regression-fixes/1-resampler_unsigned_fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'regression-fixes/1-resampler_unsigned_fix.patch')
-rw-r--r--regression-fixes/1-resampler_unsigned_fix.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/regression-fixes/1-resampler_unsigned_fix.patch b/regression-fixes/1-resampler_unsigned_fix.patch
new file mode 100644
index 0000000..99a4c8a
--- /dev/null
+++ b/regression-fixes/1-resampler_unsigned_fix.patch
@@ -0,0 +1,17 @@
+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