GNOME Bugzilla – Bug 524593
[sunaudio] fix mixer track range
Last modified: 2008-03-27 09:37:42 UTC
The attached patch fixes the SunAudio mixer so that it is smarter. The Sun Audio interface accepts a range of 0-255, but we were hardcoding the maximum before to 100. This patch fixes the code so it knows 255 is the maximum value, and avoids doing so much extra computation to convert the 0-255 range to/from 0-100. Can this go upstream?
Created attachment 108098 [details] [review] patch improving code
Committed, thanks: 2008-03-27 Tim-Philipp Müller <tim at centricular dot net> Patch by: Brian Cameron <brian.cameron at sun dot com> * sys/sunaudio/gstsunaudiomixerctrl.c: (gst_sunaudiomixer_ctrl_get_volume), (gst_sunaudiomixer_ctrl_set_volume): * sys/sunaudio/gstsunaudiomixertrack.c: (gst_sunaudiomixer_track_new): Fix up the mixer tracks to use a volume range of 0-255, which is what the sun audio API uses. This simplifies the code and avoids rounding errors. Fixes #524593.