blob: fd32ab47b2da9968eb9f44f1f280718594e34776 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--- ../../gnome-applets-2.6.0/mixer/mixer.c 2004-02-28 11:55:09.000000000 -0800
+++ mixer.c 2004-05-11 08:07:04.384547736 -0700
@@ -238,7 +238,7 @@
t = (vol - track->min_volume) /
(double) (track->max_volume - track->min_volume);
- return (gint) (VOLUME_MAX * t);
+ return (gint) rint((VOLUME_MAX * t));
}
/*
@@ -255,8 +255,8 @@
t = vol / (double) VOLUME_MAX;
- return (gint) (t * (track->max_volume - track->min_volume)
- + track->min_volume);
+ return (gint) rint((t * (track->max_volume - track->min_volume)
+ + track->min_volume));
}
static int
@@ -280,7 +280,7 @@
vol /= cdata->track->num_channels;
- return gstreamer_normalize_volume (cdata->track, (gint) vol);
+ return gstreamer_normalize_volume (cdata->track, (gint) rint(vol));
}
static void
|