After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 524593 - [sunaudio] fix mixer track range
[sunaudio] fix mixer track range
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other opensolaris
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-27 02:09 UTC by Brian Cameron
Modified: 2008-03-27 09:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch improving code (2.49 KB, patch)
2008-03-27 02:10 UTC, Brian Cameron
committed Details | Review

Description Brian Cameron 2008-03-27 02:09:47 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?
Comment 1 Brian Cameron 2008-03-27 02:10:12 UTC
Created attachment 108098 [details] [review]
patch improving code
Comment 2 Tim-Philipp Müller 2008-03-27 09:37:42 UTC
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.