/* Returns non-zero if the value is changed, zero if not changed.  */
void snd_range_muldivk(const snd_interval_t *a, const snd_interval_t *b, unsigned int k, snd_interval_t *c)
/* Returns non-zero if the value is changed, zero if not changed.  */
void snd_range_muldivk(const snd_interval_t *a, const snd_interval_t *b, unsigned int k, snd_interval_t *c)
{
    unsigned int r;
    if (a->range.empty || b->range.empty) {
        snd_range_none(c);
        return;
    }
    c->range.empty = 0;
    c->range.min = muldiv32(a->range.min, b->range.min, k, &r);
    c->range.openmin = (r || a->range.openmin || b->range.openmin);
    c->range.max = muldiv32(a->range.max, b->range.max, k, &r);
    if (r) {
        c->range.max++;
        c->range.openmax = 1;
    } else {
        c->range.openmax = (a->range.openmax || b->range.openmax);
    }
    c->range.integer = 0;
}