frac -= FRAC;
static int fractional_resample(ReSampleChannelContext *s, short *output, short *input, int nb_samples){    unsigned int frac, incr;    int l0, l1;    short *q, *p, *pend;    l0 = s->last_sample;    incr = s->incr;    frac = s->frac;    p = input;    pend = input + nb_samples;    q = output;    l1 = *p++;    for(;;) {        /* interpolate */        *q++ = (l0 * (FRAC - frac) + l1 * frac) >> FRAC_BITS;        frac = frac + s->incr;        while (frac >= FRAC) {            if (p >= pend)                goto the_end;            frac -= FRAC;            l0 = l1;            l1 = *p++;        }    } the_end:    s->last_sample = l1;    s->frac = frac;    return q - output;}