summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClive Wright <clive_wright@ntlworld.com>2008-05-08 19:16:17 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-05-08 19:16:17 +0000
commit5d89e2e0a4a28c9478113a243f0862f3da24e892 (patch)
treea81cef8ad4c525840be136094722ee1c8376c10c
parentf32cbe5017430884f7caf7b90abc805c5b71acaf (diff)
downloadgstreamer-plugins-bad-5d89e2e0a4a28c9478113a243f0862f3da24e892.tar.gz
sys/oss4/oss4-mixer-slider.c: Apparently mono sliders have the mono value repeated in the upper bits, so mask those o...
Original commit message from CVS: Based on patch by: Clive Wright <clive_wright ntlworld com> * sys/oss4/oss4-mixer-slider.c: (gst_oss4_mixer_slider_unpack_volume): Apparently mono sliders have the mono value repeated in the upper bits, so mask those out when reading them. Probably makes the mixer applet work properly in some more cases.
-rw-r--r--ChangeLog9
-rw-r--r--sys/oss4/oss4-mixer-slider.c10
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d8aba8441..74440f2af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-08 Tim-Philipp Müller <tim.muller at collabora co uk>
+
+ Based on patch by: Clive Wright <clive_wright ntlworld com>
+
+ * sys/oss4/oss4-mixer-slider.c: (gst_oss4_mixer_slider_unpack_volume):
+ Apparently mono sliders have the mono value repeated in the upper bits,
+ so mask those out when reading them. Probably makes the mixer applet
+ work properly in some more cases.
+
2008-05-08 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Olivier Crete <tester at tester dot ca>
diff --git a/sys/oss4/oss4-mixer-slider.c b/sys/oss4/oss4-mixer-slider.c
index a56dcae85..f8e7f6618 100644
--- a/sys/oss4/oss4-mixer-slider.c
+++ b/sys/oss4/oss4-mixer-slider.c
@@ -96,11 +96,17 @@ gst_oss4_mixer_slider_unpack_volume (GstOss4MixerSlider * s, int v,
val = (guint32) v;
switch (s->mc->mixext.type) {
- case MIXT_MONOSLIDER:
- case MIXT_MONOSLIDER16:
case MIXT_SLIDER:
volumes[0] = val;
break;
+ case MIXT_MONOSLIDER:
+ /* oss repeats the value in the upper bits, as if it was stereo */
+ volumes[0] = val & 0x00ff;
+ break;
+ case MIXT_MONOSLIDER16:
+ /* oss repeats the value in the upper bits, as if it was stereo */
+ volumes[0] = val & 0x0000ffff;
+ break;
case MIXT_STEREOSLIDER:
volumes[0] = (val & 0x00ff);
volumes[1] = (val & 0xff00) >> 8;