[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-test7-44-ge356a03

Lennart Poettering gitmailer-noreply at 0pointer.de
Mon Apr 6 16:21:56 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  2c2713a72cbb7388e034575b229cd3fd5700ff9f (commit)

- Log -----------------------------------------------------------------
e356a03 If the sink volume is lowered to 0 and then increased again, make sure all stream volumes follow instead of staying at 0
-----------------------------------------------------------------------

Summary of changes:
 src/pulsecore/sink.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------

commit e356a03ab2683d81a9725c73e6a58c424646a44f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 7 01:21:07 2009 +0200

    If the sink volume is lowered to 0 and then increased again, make sure all stream volumes follow instead of staying at 0

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index a522632..2c5ceac 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1028,6 +1028,8 @@ void pa_sink_update_flat_volume(pa_sink *s, pa_cvolume *new_volume) {
     for (i = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx)); i; i = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx))) {
         pa_cvolume remapped_new_volume;
 
+        /* This basically calculates i->soft_volume := i->virtual_volume / new_volume * i->volume_factor */
+
         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);
@@ -1039,7 +1041,7 @@ void pa_sink_update_flat_volume(pa_sink *s, pa_cvolume *new_volume) {
         /* We don't issue PA_SINK_INPUT_MESSAGE_SET_VOLUME because
          * we want the update to have atomically with the sink
          * volume update, hence we do it within the
-         * pa_sink_set_flat_volume() call below*/
+         * pa_sink_set_flat_volume() call below */
     }
 }
 
@@ -1061,6 +1063,8 @@ void pa_sink_propagate_flat_volume(pa_sink *s, const pa_cvolume *old_volume) {
         pa_cvolume remapped_old_volume, remapped_new_volume, fixed_volume;
         unsigned c;
 
+        /* This basically calculates i->virtual_volume := i->virtual_volume * s->virtual_volume / old_volume */
+
         remapped_new_volume = s->virtual_volume;
         pa_cvolume_remap(&remapped_new_volume, &s->channel_map, &i->channel_map);
 
@@ -1070,7 +1074,7 @@ void pa_sink_propagate_flat_volume(pa_sink *s, const pa_cvolume *old_volume) {
         for (c = 0; c < i->sample_spec.channels; c++)
 
             if (remapped_old_volume.values[c] == PA_VOLUME_MUTED)
-                fixed_volume.values[c] = PA_VOLUME_MUTED;
+                fixed_volume.values[c] = remapped_new_volume.values[c];
             else
                 fixed_volume.values[c] = (pa_volume_t)
                     ((uint64_t) i->virtual_volume.values[c] *

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list