mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
add a 'volume factor' that is implicitly multiplied into the volume of a sink input without being visible to the outside
This commit is contained in:
parent
3fc1233062
commit
de86c6e3ad
3 changed files with 27 additions and 8 deletions
|
|
@ -990,6 +990,7 @@ void pa_sink_update_flat_volume(pa_sink *s, pa_cvolume *new_volume) {
|
|||
remapped_new_volume = *new_volume;
|
||||
pa_cvolume_remap(&remapped_new_volume, &s->channel_map, &i->channel_map);
|
||||
pa_sw_cvolume_divide(&i->soft_volume, &i->virtual_volume, &remapped_new_volume);
|
||||
pa_sw_cvolume_multiply(&i->soft_volume, &i->soft_volume, &i->volume_factor);
|
||||
|
||||
/* Hooks have the ability to play games with i->soft_volume */
|
||||
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_INPUT_SET_VOLUME], i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue