mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
stream: normalize volumes when monitoring
This commit is contained in:
parent
9054cfcd8b
commit
5c048500cc
2 changed files with 11 additions and 0 deletions
|
|
@ -1181,6 +1181,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
{
|
||||
struct impl *this;
|
||||
struct port *port;
|
||||
const char *str;
|
||||
|
||||
spa_return_val_if_fail(factory != NULL, -EINVAL);
|
||||
spa_return_val_if_fail(handle != NULL, -EINVAL);
|
||||
|
|
@ -1198,6 +1199,15 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
spa_hook_list_init(&this->hooks);
|
||||
|
||||
if (info != NULL) {
|
||||
if ((str = spa_dict_lookup(info, "channelmix.normalize")) != NULL &&
|
||||
(strcmp(str, "true") == 0 || atoi(str) != 0))
|
||||
this->mix.options |= CHANNELMIX_OPTION_NORMALIZE;
|
||||
if ((str = spa_dict_lookup(info, "channelmix.mix-lfe")) != NULL &&
|
||||
(strcmp(str, "true") == 0 || atoi(str) != 0))
|
||||
this->mix.options |= CHANNELMIX_OPTION_MIX_LFE;
|
||||
}
|
||||
|
||||
this->node.iface = SPA_INTERFACE_INIT(
|
||||
SPA_TYPE_INTERFACE_Node,
|
||||
SPA_VERSION_NODE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue