[gnome-media] Print out more debug when a bar's value changes
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-media] Print out more debug when a bar's value changes
- Date: Tue, 18 Aug 2009 10:58:15 +0000 (UTC)
commit 965b33e73cb514184c147298e93c854347f57cdc
Author: Bastien Nocera <hadess hadess net>
Date: Tue Aug 18 11:54:22 2009 +0100
Print out more debug when a bar's value changes
So we can debug feedback loops more easily.
gnome-volume-control/src/gvc-mixer-dialog.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-mixer-dialog.c b/gnome-volume-control/src/gvc-mixer-dialog.c
index 6f435a0..868e677 100644
--- a/gnome-volume-control/src/gvc-mixer-dialog.c
+++ b/gnome-volume-control/src/gvc-mixer-dialog.c
@@ -646,15 +646,25 @@ static void
on_adjustment_value_changed (GtkAdjustment *adjustment,
GvcMixerDialog *dialog)
{
- gdouble volume;
GvcMixerStream *stream;
- stream = g_object_get_data (G_OBJECT (adjustment), "gvc-mixer-dialog-stream"),
- volume = gtk_adjustment_get_value (adjustment);
+ stream = g_object_get_data (G_OBJECT (adjustment), "gvc-mixer-dialog-stream");
if (stream != NULL) {
+ GObject *bar;
+ gdouble volume, rounded;
+ char *name;
+
+ volume = gtk_adjustment_get_value (adjustment);
+ rounded = round (volume);
+
+ bar = g_object_get_data (G_OBJECT (adjustment), "gvc-mixer-dialog-bar");
+ g_object_get (bar, "name", &name, NULL);
+ g_debug ("Setting stream volume %lf (rounded: %lf) for bar '%s'", volume, rounded, name);
+ g_free (name);
+
/* FIXME would need to do that in the balance bar really... */
gvc_mixer_stream_set_is_muted (stream, volume == 0);
- gvc_mixer_stream_set_volume(stream, (pa_volume_t) round (volume));
+ gvc_mixer_stream_set_volume(stream, (pa_volume_t) rounded);
gvc_mixer_stream_push_volume (stream);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]