summaryrefslogtreecommitdiffstats
path: root/sys/oss4
diff options
context:
space:
mode:
Diffstat (limited to 'sys/oss4')
-rw-r--r--sys/oss4/oss4-mixer-slider.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/oss4/oss4-mixer-slider.c b/sys/oss4/oss4-mixer-slider.c
index a56dcae8..f8e7f661 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;