[gnome-media] Avoid busy-looping caused by rounding issue
- From: Marc-Andre Lureau <malureau src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-media] Avoid busy-looping caused by rounding issue
- Date: Mon, 15 Jun 2009 13:31:20 -0400 (EDT)
commit 240079fc6e1cfeab309ecc1fbe48d3d88734e328
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Sun Jun 14 17:16:30 2009 +0300
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 fc72fb4..95042aa 100644
--- a/gnome-volume-control/src/gvc-mixer-control.c
+++ b/gnome-volume-control/src/gvc-mixer-control.c
@@ -592,11 +592,6 @@ update_sink (GvcMixerControl *control,
gvc_mixer_stream_set_volume (stream, (guint)max_volume);
gvc_mixer_stream_set_is_muted (stream, info->mute);
gvc_mixer_stream_set_can_decibel (stream, !!(info->flags & PA_SINK_DECIBEL_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->sinks,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]