<div dir="ltr"><div>Hi,</div><div><br></div><div>These patches improve the resampler set_rate function.</div><div><br></div><div>The first 2 patches do some cleanups in the GCD calculation and avoid an</div><div>overflow when calculating the new phase. This patch could probably be simplified</div><div>if we allowed 64bits operations in speexdsp.</div><div><br></div><div>The 3rd patch avoid rounding errors in the phase calculation. The problem</div><div>is that the new rate is calculated with the reduced rate, which can cause</div><div>large rounding errors and audible artifacts.</div><div><br></div><div>Patch 4 demonstrates the effect of patch 3. Compare the resampler output</div><div>before and after patch 3.</div><div><br></div><div>Patch 5 attempts to strike a balance between accuracy and memory usage by</div><div>allowing a small rounding error in the phase.</div><div><br></div><div>Let me know what you think,</div><div>Wim</div><div><br></div></div>