audioconvert: fix return values

Return negative error numbers for errors.
This commit is contained in:
Wim Taymans 2023-04-03 21:34:10 +02:00
parent e5809cf4f4
commit d41d8cf983

View file

@ -1142,7 +1142,7 @@ static int apply_props(struct impl *this, const struct spa_pod *param)
void *sequence = NULL;
if (p->volume == p->prev_volume) {
spa_log_error(this->log, "no change in volume, cannot ramp volume");
return EIO;
return -EIO;
} else if (p->volume > p->prev_volume)
sequence = generate_ramp_up_seq(this);
else
@ -1150,7 +1150,7 @@ static int apply_props(struct impl *this, const struct spa_pod *param)
if (!sequence) {
spa_log_error(this->log, "unable to generate sequence");
return EIO;
return -EIO;
}
this->vol_ramp_sequence = (struct spa_pod_sequence *) sequence;
this->vol_ramp_offset = 0;