mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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.
This commit is contained in:
parent
b33c37c256
commit
0e4d8ef5fe
1 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue