Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50770 - [PATCH] GNOME 2.6 mixer_applet2 fades to mute under ALSA
Summary: [PATCH] GNOME 2.6 mixer_applet2 fades to mute under ALSA
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Highest major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 10:25 UTC by Travis Snoozy
Modified: 2004-05-20 16:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Travis Snoozy 2004-05-11 10:25:34 UTC
There is a bug in mixer_applet2 that causes the volume to slowly reduce to 0 over time if the volume is set to any value that is not 100%. I have already made a patch and sent it upstream for acceptance (see bug 139961 in the GNOME bugtracking system). This bug/patch affects the ALSA/GStreamer codepath only; I have not seen reports of this bug from folks using other codepaths.

This affects the gnome-applets-2.6.0 ebuild; I'd like to request a rev bump on the ebuild to patch this, because it makes the sound applet more than worthless to ALSA users.

Reproducible: Always
Steps to Reproduce:




### Patch ###

--- ../../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
Comment 1 foser (RETIRED) gentoo-dev 2004-05-20 16:01:35 UTC
patch added to 2.6.0-r1, thanks

keeping an eye on upstream developments.