[gnome-media] Round the scale's volume before casting it
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-media] Round the scale's volume before casting it
- Date: Tue, 18 Aug 2009 10:58:10 +0000 (UTC)
commit f8e8e5b498761b0157cd899699980dd320585aa0
Author: Bastien Nocera <hadess hadess net>
Date: Tue Aug 18 11:00:19 2009 +0100
Round the scale's volume before casting it
Should avoid rounding errors.
gnome-volume-control/src/gvc-mixer-dialog.c | 2 +-
gnome-volume-control/src/gvc-stream-status-icon.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-mixer-dialog.c b/gnome-volume-control/src/gvc-mixer-dialog.c
index 9dc0952..6f435a0 100644
--- a/gnome-volume-control/src/gvc-mixer-dialog.c
+++ b/gnome-volume-control/src/gvc-mixer-dialog.c
@@ -654,7 +654,7 @@ on_adjustment_value_changed (GtkAdjustment *adjustment,
if (stream != NULL) {
/* 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) volume);
+ gvc_mixer_stream_set_volume(stream, (pa_volume_t) round (volume));
gvc_mixer_stream_push_volume (stream);
}
}
diff --git a/gnome-volume-control/src/gvc-stream-status-icon.c b/gnome-volume-control/src/gvc-stream-status-icon.c
index e036d5f..6858726 100644
--- a/gnome-volume-control/src/gvc-stream-status-icon.c
+++ b/gnome-volume-control/src/gvc-stream-status-icon.c
@@ -72,7 +72,7 @@ on_adjustment_value_changed (GtkAdjustment *adjustment,
volume = gtk_adjustment_get_value (adjustment);
gvc_mixer_stream_set_volume(icon->priv->mixer_stream,
- (pa_volume_t) volume);
+ (pa_volume_t) round (volume));
gvc_mixer_stream_push_volume(icon->priv->mixer_stream);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]