[gnome-media] Avoid busy-looping caused by rounding issue



commit 69a2654a90063e65afc6e47263225f02fa82e2d6
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Mon Jun 22 11:03:35 2009 +0100

    Avoid busy-looping caused by rounding issue
    
    The dB value is just an interpretation of the uint volume. Since
    volume is already updated, let's avoid updating it 2 times. That
    solves a nasty set volume looping.

 gnome-volume-control/src/gvc-mixer-control.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-mixer-control.c b/gnome-volume-control/src/gvc-mixer-control.c
index 95042aa..b642467 100644
--- a/gnome-volume-control/src/gvc-mixer-control.c
+++ b/gnome-volume-control/src/gvc-mixer-control.c
@@ -658,11 +658,6 @@ update_source (GvcMixerControl      *control,
         gvc_mixer_stream_set_is_muted (stream, info->mute);
         gvc_mixer_stream_set_can_decibel (stream, !!(info->flags & PA_SOURCE_DECIBEL_VOLUME));
         gvc_mixer_stream_set_base_volume (stream, (guint32) info->base_volume);
-        if (!!(info->flags & PA_SINK_DECIBEL_VOLUME)) {
-                gdouble db;
-                db = pa_sw_volume_to_dB (max_volume);
-                gvc_mixer_stream_set_decibel (stream, db);
-        }
 
         if (is_new) {
                 g_hash_table_insert (control->priv->sources,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]