audioconvert: only reinit channelmix when params change

Don't reinitialize the channel mixer when only the volume changes.
This commit is contained in:
Wim Taymans 2022-10-13 10:30:32 +02:00
parent 9efb2e3463
commit 3a7d6b74f2

View file

@ -845,6 +845,9 @@ static int parse_prop_params(struct impl *this, struct spa_pod *params)
spa_log_info(this->log, "key:'%s' val:'%s'", name, value);
changed += audioconvert_set_param(this, name, value);
}
if (changed) {
channelmix_init(&this->mix);
}
return changed;
}
@ -931,7 +934,6 @@ static int apply_props(struct impl *this, const struct spa_pod *param)
else if (have_channel_volume)
p->have_soft_volume = false;
channelmix_init(&this->mix);
set_volume(this);
}
return changed;