[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] source-output: Fix source-output volume after move of virtual source stream

PulseAudio Marge Bot gitlab at gitlab.freedesktop.org
Thu Feb 18 20:41:49 UTC 2021



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
6b2844a6 by Georg Chini at 2021-02-17T21:42:14+01:00
source-output: Fix source-output volume after move of virtual source stream

When the source-output of a virtual source with volume sharing disabled is moved,
the source output volume is reset to 100%. This patch fixes the problem by
applying the virtual source volume to the source-output after the move.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/509>

- - - - -


1 changed file:

- src/pulsecore/source-output.c


Changes:

=====================================
src/pulsecore/source-output.c
=====================================
@@ -1512,6 +1512,16 @@ static void update_volume_due_to_moving(pa_source_output *o, pa_source *dest) {
             pa_source_output_set_volume_direct(o, &o->reference_ratio);
             o->real_ratio = o->reference_ratio;
             pa_sw_cvolume_multiply(&o->soft_volume, &o->real_ratio, &o->volume_factor);
+
+            /* If this is a virtual source stream, we have to apply the source volume
+             * to the source output. */
+            if (o->destination_source) {
+                pa_cvolume vol;
+
+                vol = o->destination_source->real_volume;
+                pa_cvolume_remap(&vol, &o->destination_source->channel_map, &o->channel_map);
+                pa_source_output_set_volume(o, &vol, o->destination_source->save_volume, true);
+            }
         }
     }
 



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/6b2844a61d659fc86e84988775677708c2a8c242

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/6b2844a61d659fc86e84988775677708c2a8c242
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20210218/3abe8a54/attachment.htm>


More information about the pulseaudio-commits mailing list