const int offset = samp_frac_num * st->oversample / st->den_rate;
#ifdef FIXED_POINT
const spx_word16_t frac =
- PDIV32 (SHL32 ((samp_frac_num * st->oversample) % st->den_rate, 15),
- st->den_rate);
+ ((((gint64) samp_frac_num * (gint64) st->oversample) % st->den_rate)
+ << 15) / st->den_rate;
#else
const spx_word16_t frac =
((float) ((samp_frac_num * st->oversample) % st->den_rate)) /
if (old_den > 0) {
for (i = 0; i < st->nb_channels; i++) {
- st->samp_frac_num[i] = st->samp_frac_num[i] * st->den_rate / old_den;
+ st->samp_frac_num[i] =
+ (gint64) st->samp_frac_num[i] * (gint64) st->den_rate / old_den;
/* Safety net */
if (st->samp_frac_num[i] >= st->den_rate)
st->samp_frac_num[i] = st->den_rate - 1;