mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
channelmix: recalc channelmix when param changed
This commit is contained in:
parent
7241bf3c54
commit
ab8f9be979
1 changed files with 8 additions and 3 deletions
|
|
@ -595,13 +595,16 @@ static int channelmix_set_param(struct impl *this, const char *k, const char *s)
|
||||||
this->mix.lfe_cutoff = atoi(s);
|
this->mix.lfe_cutoff = atoi(s);
|
||||||
else if (spa_streq(k, "channelmix.disable"))
|
else if (spa_streq(k, "channelmix.disable"))
|
||||||
this->props.disabled = spa_atob(s);
|
this->props.disabled = spa_atob(s);
|
||||||
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_prop_params(struct impl *this, struct spa_pod *params)
|
static int parse_prop_params(struct impl *this, struct spa_pod *params)
|
||||||
{
|
{
|
||||||
struct spa_pod_parser prs;
|
struct spa_pod_parser prs;
|
||||||
struct spa_pod_frame f;
|
struct spa_pod_frame f;
|
||||||
|
int changed = 0;
|
||||||
|
|
||||||
spa_pod_parser_pod(&prs, params);
|
spa_pod_parser_pod(&prs, params);
|
||||||
if (spa_pod_parser_push_struct(&prs, &f) < 0)
|
if (spa_pod_parser_push_struct(&prs, &f) < 0)
|
||||||
|
|
@ -634,9 +637,11 @@ static int parse_prop_params(struct impl *this, struct spa_pod *params)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
spa_log_info(this->log, "key:'%s' val:'%s'", name, value);
|
spa_log_info(this->log, "key:'%s' val:'%s'", name, value);
|
||||||
channelmix_set_param(this, name, value);
|
changed += channelmix_set_param(this, name, value);
|
||||||
}
|
}
|
||||||
return 0;
|
if (changed)
|
||||||
|
channelmix_init(&this->mix);
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int apply_props(struct impl *this, const struct spa_pod *param)
|
static int apply_props(struct impl *this, const struct spa_pod *param)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue