mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audioconvert: handle monitor volumes
Implement monitor volumes in the merger. There are two volumes, the channel volume and the monitor volume. The monitor volume is always applied. By default the monitor volume will now follow the main volume of the node. This can be disabled with a monitor.channel-volumes property. See #674
This commit is contained in:
parent
cf6d7b5dee
commit
1511f19f70
2 changed files with 205 additions and 10 deletions
|
|
@ -508,7 +508,10 @@ static int impl_node_enum_params(void *object, int seq,
|
|||
return spa_node_enum_params(this->channelmix, seq, id, start, num, filter);
|
||||
|
||||
case SPA_PARAM_Props:
|
||||
return spa_node_enum_params(this->channelmix, seq, id, start, num, filter);
|
||||
if (this->fmt[SPA_DIRECTION_INPUT] == this->merger)
|
||||
return spa_node_enum_params(this->merger, seq, id, start, num, filter);
|
||||
else
|
||||
return spa_node_enum_params(this->channelmix, seq, id, start, num, filter);
|
||||
|
||||
default:
|
||||
return -ENOENT;
|
||||
|
|
@ -790,6 +793,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
}
|
||||
case SPA_PARAM_Props:
|
||||
{
|
||||
if (this->fmt[SPA_DIRECTION_INPUT] == this->merger)
|
||||
res = spa_node_set_param(this->merger, id, flags, param);
|
||||
res = spa_node_set_param(this->channelmix, id, flags, param);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue